Adobe Flex Actionscript Question:
Have you built any components with actionscript? If so explain how you did it?

Answer:
CountryComboBox.as
package components
{ import mx.controls.ComboBox;
public class CountryComboBox extends ComboBox
{ public function CountryComboBox()
{ dataProvider = [ "United States", "United Kingdom" ];
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:custom="components.*"
width="220" height="115"
>
<custom:CountryComboBox />
</mx:Application>
package components
{ import mx.controls.ComboBox;
public class CountryComboBox extends ComboBox
{ public function CountryComboBox()
{ dataProvider = [ "United States", "United Kingdom" ];
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:custom="components.*"
width="220" height="115"
>
<custom:CountryComboBox />
</mx:Application>
Previous Question | Next Question |
How do you generate random numbers within a given limit with actionscript? | How do you implement push on a flex applications? |