I've got a combobox that sits inside of a panel in Flex 3. Basically I want to fade the panel using a Fade effect in Actionscript. I can get the fade to work fine, however the label of the combobox does not fade. I had this same issue with buttons and found that their fonts needed to be embedded. No problem. I embedded the font that I was using and the buttons' labels faded correctly. I've tried a similar approach to the combobox, but it does not fade the selected item label.
Here is what I've done so far: Embed code for the font at the top of my MXML in script:
[Embed("assets/trebuc.ttf", fontName="TrebuchetMS")]
public var trebuchetMSFont:Class;
In my init function
//register the font.
Font.registerFont(trebuchetMSFont);
The combobox's mxml:
<mx:ComboBox id="FilterFields" styleName="FilterDropdown"
left="10" right="10" top="10"
fontSize="14">
<mx:itemRenderer>
<mx:Component>
<mx:Label fontSize="10" />
</mx:Component>
</mx:itemRenderer>
</mx:ComboBox>
And a style that I wrote to get the fonts applied to the combobox:
.FilterDropdown
{
embedFonts: true;
fontFamily: TrebuchetMS;
fontWeight: normal;
fontSize: 12;
}
The reason I had to write a style instead of placing it in the "FontFamily" attribute was that the style made all the text on the combobox the correct font where the "FontFamily" attribute only made the items in the dropdown use the correct font.