1 Reply Latest reply on Dec 22, 2011 9:13 AM by 5Systems

    Error: Could not find compiled resource bundle 'controls' for locale 'en_US'.

    5Systems Level 1

      I am getting the above error when trying to dynamicly load a stylesheet using the styleManager.loadStyleDeclarations( ); method.

       

      • I am using the Flex 4.0 SDK in Flash Builder 4.0
      • I am using the mx.core.UIComponent.styleManager():IStyleManager2
      • I have compiled my css to a swf file.
      • My CSS document(s) are calling myskin file like so

       

      s|Button 
      {
                skinClass:          ClassReference("com.skinningtest.button.ButtonSWFSkin");
      }
      

       

      and my skin file(s) embeds the swf objects i am using for the skin like so:

       

      <mx:Image id="button"
                                      source.up="@Embed(source='assets/skinObjects.swf', symbol='Button_upSkin')"
                                      source.over="@Embed(source='assets/skinObjects.swf', symbol='Button_overSkin')"
                                      source.down="@Embed(source='assets/skinObjects.swf', symbol='Button_downSkin')"
                                      source.disabled="@Embed(source='assets/skinObjects.swf', symbol='Button_disabledSkin')"/>
      
      

       

      I can provide my project if needed. it is jsut a small test project to see if i can dynamicly load skins from a set of swf files.

       

      Thanks,

        • 1. Re: Error: Could not find compiled resource bundle 'controls' for locale 'en_US'.
          5Systems Level 1

          I have narrowed the source of the error down. It seems to fire when I use the <mx:Image/>  tag in my skin class. I have tried both

           

          <mx:Image id="button" source.up="@Embed(source='assets/skinObjects.swf', symbol='Button_upSkin')"

           

          and

           

          <mx:Image source="@Embed('assets/skinObjects.swf#Button_upSkin')" />

           

          Both throw this error.

           

          I have also gone into my flex project compliler options and removed the additinal compiler arguments for the local 'en_US'

           

          Then I then tried the info in this post by GordonSmith quoted here:


          Use a comma-separated list such as -include-resource-bundles=resources,core,controls,containers. Specify additional source paths so that it can find the .properties files for these bundles, which are located in directories such as frameworks/projects/framework/bundles/en_US, frameworks/projects/mx/bundles/en_US, frameworks/projects/spark/bundles/en_US. You can use {locale} in place of the actual locale, as in frameworks/projects/framework/bundles/{locale}.

           

          I placed the following in my additial compiler arguments:

           

          -include-resource-bundles=resources,core,controls,containers,frameworks/projects/framework /bundles/en_US,frameworks/projects/mx/bundles/en_US,frameworks/projects/spark/bundles/en_U S

           

          This does not help.

           

          Any thoughts as to why I am getting this error would be of a great help.

           

          Thanks,

           

          Message was edited by: 5Systems