Alex,
Thanks for quick response. Following are the answers to your questions.
1. Yes I have embed each fonts in .swf, and use following css
@font-face {
src: url("adlib_embed.swf");
fontFamily: "Ad Lib";
}
2. Sorry I have no idea on selectors. Is it the thing which I am missing?
3. MyTextArea is a mxml file, and root tag of this component is TextArea
4. The code which loads CSS SWF is in the module but again in Card
component. (main app > module > card (custom component)load CSS SWF)
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Are you embedding fonts? Or just setting the font family?
>
>
>
> What kinds of selectors are you using to tell MyTextArea about its font?
>
>
>
> What does MyTextArea extend?
>
>
>
> Is the code that loads the CSS SWF in the module or main app?
>
>
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of kaushal_bshah
> Sent: Thursday, July 24, 2008 3:06 AM
> To: [email protected]
> Subject: [flexcoders] Loading style sheets at run time
>
>
>
> I have created few fonts css and compiled them into swf to load them
> at run time.
>
> There is one custom component Card, is placed into a Module and this
> Module is loaded by main application.
>
> The Card component contains TextArea, MyTextArea(custom component) and
> ComboBox (which display font list).
>
> Now when user select any font from ComboBox, Card component load css
> and when it get loaded, it updates fontFamily of TextArea and
> MyTextArea. But only TextArea updated with new fonts while MyTextArea
> is not getting update anytime.
>
> Can anyone help me to figure out this.
>
> I am using following code to load css run time.
>
> var myEvent:IEventDispatcher =
> StyleManager.loadStyleDeclarations(fontSource[0].src,true,false,Applicat
> ionDomain.currentDomain);
> myEvent.addEventListener(StyleEvent.COMPLETE,fontComplete);
> myEvent.addEventListener(StyleEvent.ERROR,fontError);
>
> Any help is appreciated, Thanks
>