Mega Code Archive

 
Categories / Flex / Effects
 

Apply the Fade effect to the Label control using the system font

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">     <mx:Style>         @font-face {             src:url("a.ttf");             font-family: myFont;          }     </mx:Style>     <mx:Fade id="fadeOut" alphaFrom="1.0" alphaTo="0.5" />     <mx:Fade id="fadeIn" alphaFrom="0.5" alphaTo="1.0" />     <mx:VBox>         <mx:Label fontFamily="myFont" mouseDownEffect="{fadeOut}" mouseUpEffect="{fadeIn}"             text="uses the WebPro embedded font and the text will fade." />     </mx:VBox> </mx:Application>