12 Replies Latest reply on Apr 27, 2010 7:23 AM by post2umesh

    stylemanager.laodStyleDeclarations throws error while trying to laod a style swf

    post2umesh Level 1

      I have a very simple prototype to depict how run time style sheets can be applied in FLex 4. Fow this I have first made a Theme SWC which contais a css and couple of skin classes.


      I have also created the swf of the css so that I can load swf at runtime. I have used the following link:


      http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f8c.html#WS2d b454920e96a9e51e63e3d11c0bf69084-7e6d


      I am using the following code to load style sheet


                    styleManager.loadStyleDeclarations("../assets/runtimeStyles/ApplicationStyle.swf",true,tr ue, ApplicationDomain.currentDomain);




      But I am seeing an error whle runing the prototype from Flash Builder 4. The error is



      Error: Could not find compiled resource bundle 'controls' for locale 'en_US'.
          at mx.resources::ResourceManagerImpl/installCompiledResourceBundle()[E:\dev\4.0.0\frameworks \projects\framework\src\mx\resources\ResourceManagerImpl.as:340]
          at mx.resources::ResourceManagerImpl/installCompiledResourceBundles()[E:\dev\4.0.0\framework s\projects\framework\src\mx\resources\ResourceManagerImpl.as:269]
          at mx.core::FlexModuleFactory/installCompiledResourceBundles()[E:\dev\4.0.0\frameworks\proje cts\framework\src\mx\core\FlexModuleFactory.as:610]
          at mx.core::FlexModuleFactory/docFrameHandler()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\core\FlexModuleFactory.as:580]
          at mx.core::FlexModuleFactory/docFrameListener()[E:\dev\4.0.0\frameworks\projects\framework\ src\mx\core\FlexModuleFactory.as:126]



      Point o notice is even after this error the style changes are applied but the error window pops up and I have to select continue.