<p>I've got a combo-box 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 combo-box 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 combo-box, but it does not fade the selected item label.</p>

<p>Here is what I've done so far:
Embed code for the font at the top of my MXML in script:</p>

<pre><code>[Embed("assets/trebuc.ttf", fontName="TrebuchetMS")]
public var trebuchetMSFont:Class;
</code></pre>

<p>In my init function</p>

<pre><code>//register the font.
Font.registerFont(trebuchetMSFont);
</code></pre>

<p>The combobox's mxml:</p>

<pre><code>&lt;mx:ComboBox id="FilterFields" styleName="FilterDropdown" 
  left="10" right="10" top="10"
  fontSize="14"&gt;
  &lt;mx:itemRenderer&gt;
    &lt;mx:Component&gt;
      &lt;mx:Label fontSize="10" /&gt;
    &lt;/mx:Component&gt;
  &lt;/mx:itemRenderer&gt;
&lt;/mx:ComboBox&gt;
</code></pre>

<p>And a style that I wrote to get the fonts applied to the combo-box:</p>

<pre><code>.FilterDropdown
{
  embedFonts: true;
  fontFamily: TrebuchetMS;
  fontWeight: normal;
  fontSize: 12; 
}
</code></pre>

<p>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 combo-box the correct font where the "FontFamily" attribute only made the items in the drop-down use the correct font.
­­­­­­­­­­­­­­­­­­­­­­­­­</p>

[{'answer_id': 18463, 'author': 'Matt MacLean', 'author_id': 22, 'author_profile': 'https://Stackoverflow.com/users/22', 'pm_score': 2, 'selected': False, 'text': '<p>Hmm, I am not sure why that isn\'t working for you. Here is an example of how I got it to work:</p>\n\n<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;\n&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="fx.play([panel])"&gt;\n    &lt;mx:Style&gt;\n        @font-face {\n            src: local("Arial");\n            fontFamily: ArialEm;\n        }\n\n        @font-face {\n            src: local("Arial");\n            fontFamily: ArialEm;\n            fontWeight: bold;\n        }\n\n        @font-face {\n            src: local("Arial");\n            fontFamily: ArialEm;\n            font-style: italic;\n        }\n    &lt;/mx:Style&gt;\n    &lt;mx:XML id="items" xmlns=""&gt;\n        &lt;items&gt;\n            &lt;item label="Item 1" /&gt;\n            &lt;item label="Item 2" /&gt;\n            &lt;item label="Item 3" /&gt;\n        &lt;/items&gt;\n    &lt;/mx:XML&gt;\n    &lt;mx:Panel id="panel" x="10" y="10" width="250" height="200" layout="absolute"&gt;\n        &lt;mx:ComboBox fontFamily="ArialEm" x="35" y="10" dataProvider="{items.item}" labelField="@label"&gt;&lt;/mx:ComboBox&gt;\n    &lt;/mx:Panel&gt;\n    &lt;mx:Fade id="fx" alphaFrom="0" alphaTo="1" duration="5000" /&gt;\n&lt;/mx:Application&gt;\n</code></pre>\n\n<p>Hope this helps you out.</p>\n'}, {'answer_id': 83154, 'author': 'user15899', 'author_id': 15899, 'author_profile': 'https://Stackoverflow.com/users/15899', 'pm_score': 2, 'selected': False, 'text': "<p>You can often use &lt;mx:Dissolve&gt; instead of &lt;mx:Fade&gt;, it looks nearly identical and doesn't require embedded fonts.</p>\n"}, {'answer_id': 472260, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Thanks for your help.\nHad exactly the same problem.\nThe trick is in the embedding the "bold" version of the font you are using.\nEven though the font in your ComboBox isn\'t set to Bold ...</p>\n'}, {'answer_id': 749676, 'author': 'Marcus Stade', 'author_id': 68909, 'author_profile': 'https://Stackoverflow.com/users/68909', 'pm_score': 1, 'selected': False, 'text': '<p>Dissolve works by fading a solid color rectangle in and out instead of fading the actual component. This works fine, especially when you wish to control the color to which the component should fade. However, sometimes you need transparency and thus must use Fade. There is a little trick to get Fade to work neatly with both device fonts and embedded fonts: use a blur filter with no blur.</p>\n\n<p>Basically, when you set a bitmap filter the player internally creates a bitmap copy of your object to which it then applies the filter. If the blur is set to not blur, so to speak, it will still look good and be able to fade perfectly fine. This breaks the zoom feature of the player though since the text is now rasterized.</p>\n\n<pre><code>&lt;mx:Label id="percentage" text="{progress} %" truncateToFit="false"&gt;\n    &lt;mx:filters&gt;\n        &lt;mx:BlurFilter blurX="0" blurY="0" /&gt;\n    &lt;/mx:filters&gt;\n&lt;/mx:Label&gt;\n</code></pre>\n'}, {'answer_id': 2311050, 'author': 'akash', 'author_id': 278704, 'author_profile': 'https://Stackoverflow.com/users/278704', 'pm_score': 0, 'selected': False, 'text': "<pre><code>var htm = $('#comboboxId').find('option:selected').html();\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/18419', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1290/']