0 Replies Latest reply on Jun 4, 2011 2:33 PM by FM_Flame

    Flex 4.1 Runtime CSS: CSS in module or just CSS

    FM_Flame Level 1



      I guess this question's answer is obvious but just in case I would like to ask.


      I have application which loads a module. I would like to load some fonts before I load the module, so when the module is loaded it displays it's text correctly. So to do that at the moment I load one plain module with a stylesheet in it where I have the embedded fonts, and then I load the module with the text.


      Should I not use a module with a stylesheet but compile a stylesheet separately and load it with StyleManager.loadStyleDeclarations() ?


      NOTE: Also using the StyleManager I can set true to the second parameter of loadStyleDeclarations which will force updating the styles. How can I do that without loading new stylesheet? I want to do that in case the styles apply for something that is already on screen and I load the module with the styles at a later time.


      Another thing is that If I recall correctly if I want to have the stylesheet in swf I need to compile it myself. And with the module with a stylesheet case that happens automatically.


      So.. thoughts ?