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
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.
Copy link to clipboard
Copied
And you need to set the securityDomain parameter on loadStyleDeclarations.
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()
Copy link to clipboard
Copied
Did you set the securityDomain parameter in loadStyleDeclarations?
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);
Copy link to clipboard
Copied
That looks right. Does http://e202.classicinformatics.com/crossdomain.xml permit the domain you are running from?
Copy link to clipboard
Copied
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.
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
Copy link to clipboard
Copied
What matters is the pair of URLs for the app and the module. What app/module pairs work and don’t work?