2 Replies Latest reply on Apr 25, 2008 3:59 PM by srivello2

    Error while using StyleManager.loadStyleDeclarations function

    _akhil_
      I get an error when i try to load swf style sheets using the loadStyleDeclarations function.

      <------------------------------->

      1 Error found.

      Error /main.mxml:6
      Call to a possibly undefined method loadStyleDeclarations through a reference with static type Class.

      5: creationComplete="initApp();"
      6: initialize="StyleManager.loadStyleDeclarations( 'MacOSX.swf',true)"
      7: >
        • 1. Re: Error while using StyleManager.loadStyleDeclarations function
          _akhil_ Level 1
          i get an error when i deploy my application using tomcat... but not while running as Flex Application directly from eclipse plugin..
          can anyone explain why this is happening??
          • 2. Re: Error while using StyleManager.loadStyleDeclarations function
            srivello2
            Hi,

            Great, simple example. I'm working on something similar; an application that loads runtime css.swf. When the loader and css.swf are online it works fine, and when the loader and the css.swf are offline it works fine. However when the loader is offline and the css.swf is online I get the following error. This situation is desired as it contracts me to use the 'live' styles while I do updates on my loader from my desktop. I can recopy my online css.swf to the offline as a workaround, but that is less desirable. I want to fix the issue so that the loader can be offline and the css.swf can be online. Typically in flash this type of operation (for everything except this css.swf workflow) works fine in my experience. As far as I can tell its because the css.swf does not 'allow' itself, security-wise to be loaded. The css.swf has no as3 scope of course (because its based in a *.css file) so I can't use Security.allowDomain('*'). Likewise it doesn't call a crossdomain automatically either.

            ERROR:
            Error: Unable to load style(SWF is not a loadable module): http://images50.neopets.com/style_set_manager/styles_EN_v1.swf.

            QUESTION:
            Anyone know how to get this to work? I'll check back to this blog daily, and post the solution here if I find it elsewhere.