Skip to main content
Participant
March 5, 2012
Question

How to load compiled style (style.swf) from other server.

  • March 5, 2012
  • 5 replies
  • 2273 views

Hi,

      I have to load compiled css (swf) inside an application, when I load it  like;

1.  styleManager.loadStyleDeclarations('/demo/test.swf')  -   Works

2. styleManager.loadStyleDeclarations('http://ec202.classicinformatics.com/demo/test.swf')  -  Not Works

    [not a loadable content]

 

      What I need it I have a server for storing all styles, themes etc that I want to use for all application on any server.

Thanks,

Premkant

This topic has been closed for replies.

5 replies

Participant
March 7, 2012

This is not problem of different server but whenever I do use absolute path either on same server or different server same error.

Way 1:

var dis:IEventDispatcher = styleManager.loadStyleDeclarations('http://ec202.classicinformatics.com/demo/test.swf',true,false,

                                        ApplicationDomain.currentDomain,SecurityDomain.cu rrentDomain);  

Never works;

Way 2:

var dis:IEventDispatcher = styleManager.loadStyleDeclarations('/demo/test.swf',true,false,

                                        ApplicationDomain.currentDomain,SecurityDomain.cu rrentDomain);  

Always work fine.

Note: test.swf   working fine if I use like way 2 but not if use like way 1 no matter on same server or different server.

Thanks a ton

Adobe Employee
March 7, 2012

What matters is the pair of URLs for the app and the module. What app/module pairs work and don’t work?

Participant
March 7, 2012
Adobe Employee
March 7, 2012

Sounds like the SWF is not being built correctly. I would try to find out why ModuleBase is not in the SWF.

Participant
March 6, 2012

Here is how I am loading

var dis:IEventDispatcher = styleManager.loadStyleDeclarations('http://ec202.classicinformatics.com/demo/test.swf',true,false,

                                        ApplicationDomain.currentDomain,SecurityDomain.currentDomain);

 

                                        dis.addEventListener(StyleEvent.COMPLETE,styleComplete);

                                        dis.addEventListener(StyleEvent.ERROR,styleError);

                                        dis.addEventListener(StyleEvent.PROGRESS,styleProgress);

Adobe Employee
March 6, 2012

That looks right. Does http://e202.classicinformatics.com/crossdomain.xml permit the domain you are running from?

Participant
March 6, 2012

I have crossdomain.xml already on server thats why I can load all other assets, only problem with style.swf.

Here is error I am getting

     

VerifyError: Error #1014: Class mx.modules::ModuleBase could not be found.

          at flash.display::MovieClip/nextFrame()

          at mx.core::FlexModuleFactory/deferredNextFrame()

          at mx.core::FlexModuleFactory/update()

          at mx.core::FlexModuleFactory/moduleCompleteHandler()

Adobe Employee
March 6, 2012

Did you set the securityDomain parameter in loadStyleDeclarations?

Participating Frequently
March 5, 2012

Possibly it is a crossdomain.xml issue? Meaning there is security keeping swf files from being access between two domains.

Adobe Employee
March 5, 2012

And you need to set the securityDomain parameter on loadStyleDeclarations.