0 Replies Latest reply on Jul 24, 2008 6:50 AM by kaushal_bs

    Loading style sheets at run time

    kaushal_bs
      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,ApplicationDomain.current Domain);

      myEvent.addEventListener(StyleEvent.COMPLETE,fontComplete);

      myEvent.addEventListener(StyleEvent.ERROR,fontError);

      Any help will be appreciated, Thanks