• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

Community Beginner ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

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

TOPICS
Developers

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

And you need to set the securityDomain parameter on loadStyleDeclarations.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

Did you set the securityDomain parameter in loadStyleDeclarations?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 05, 2012 Mar 05, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 06, 2012 Mar 06, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 06, 2012 Mar 06, 2012

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 06, 2012 Mar 06, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 07, 2012 Mar 07, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 07, 2012 Mar 07, 2012

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines