Hey Preetham,
Renu was right!
The Code would look similar to this. There are other ways of doin this too.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">

     <mx:Style>
     @font-face
     {
        src:url("/../assets/MyriadWebPro.ttf");
        fontFamily: myFontFamily;
        advancedAntiAliasing: true; <!--This is optional: see
http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_04.html-->
     }

     Canvas
     {
        fontFamily: myFontFamily;
        fontSize: 15;
     }
     </mx:Style>

            <mx:Fade id="fadeMeIn"
                           duration="1000"
   alphaFrom="0                        alphaTo="1.0"/>
            <mx:Fade id="fadeMeOut"
                           duration="1000"
                           alphaFrom="1.0"
                           alphaTo="0.0"/>



<mx:Canvas>


<mx:Label text="Hi Preetham!!!" horizontalCenter="0" id="exntrx"
                    verticalCenter="0"
                    color="#111213"
                    showEffect="{fadeMeIn}"   hideEffect="{fadeMeOut}"
 visible="{show.selected}"/>

<mx:CheckBox id="show" label="Show" selected="true"  verticalCenter="20"
                   horizontalCenter="0"/>
</mx:Canvas>

</mx:Application>


Download the font from
https://fisheye.springsource.org/changelog/spring-flex?cs=141#trunkZ002fspring-flex-samplesZ002fspring-flex-testdriveZ002finsync-air-springZ002fsrcZ002fmainZ002fflexZ002fassetsZ002ffontsZ002fMyriadWebPro.ttf


and put it inside ur assets folder or wherever you want to.

Also check this out for more references:
http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_04.html


Hope this helps!

On Wed, Jul 29, 2009 at 2:21 PM, Preetham Hegde <[email protected]>wrote:

> Thanks Renu,
>
> On Wed, Jul 29, 2009 at 11:19 PM, Renu <[email protected]> wrote:
>
>> Hi Preetham,
>> You may need to embed the font(label font), this is the only way to
>> trigger the effects on Text component.
>>
>> Thanks,
>> Renu
>> On Wed, Jul 29, 2009 at 2:20 PM, pratham <[email protected]>wrote:
>>
>>>
>>> Hi frnds,
>>>
>>> How to apply effect to label.
>>> I want to give fade effect to label. I have tried with following code,
>>> but it didnt work... any solutions?
>>>
>>>
>>> ------------------------------------------------------------------------------------
>>>    <mx:Fade id="fadeIn" duration="2000" alphaFrom="0.0" alphaTo="1.0"/
>>> >
>>>
>>>   <mx:Label
>>> id="nameLabel"
>>>            styleName="statsLabel"
>>> color="#00976e"
>>>            x="7" y="0"
>>> showEffect="fadeIn"
>>>
>>> visible="false"
>>>            text="{user_name}" width="94"/
>>> >
>>>
>>> --------------------------------------------------------------------------------
>>> effect must be seen when i made visible="true", but it didn't !!!!
>>>
>>>
>>> --
>>> Regards,
>>> Preetham Hegde
>>>
>>>
>>>
>>
>>
>> --
>> Thanks,
>> Renu
>>
>>
>>
>
>
> --
> Regards,
> Preetham Hegde
> 9844244834
>
> _______________________________________________
> But surely for everything you love you have to pay some price.
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to