Skip to main content
Participant
Mar 5, 2012 2:10 PM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

10 replies

Participant
Mar 7, 2012 10:59 AM UTC

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

Translate
Inspiring
Mar 7, 2012 5:01 PM UTC

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

Translate
Participant
Mar 7, 2012 4:18 AM UTC
Inspiring
Mar 7, 2012 6:39 AM UTC

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

Translate
Participant
Mar 6, 2012 7:54 AM UTC

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);

Translate
Inspiring
Mar 6, 2012 4:36 PM UTC

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

Translate
Participant
Mar 6, 2012 6:39 AM UTC

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()

Translate
Inspiring
Mar 6, 2012 7:27 AM UTC

Did you set the securityDomain parameter in loadStyleDeclarations?

Translate
Participating Frequently
Mar 5, 2012 2:38 PM UTC

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

Translate
Inspiring
Mar 5, 2012 4:35 PM UTC

And you need to set the securityDomain parameter on loadStyleDeclarations.

Translate