1
votes

I am trying to load a SWF file that is generated externally (Pano2VR) into my main Flex app. I use the SWFLoader MXML object and everything works fine locally. I really want to put the child SWF into another domain though (cloud). That works fine too (once I setup the crossdomain.xml file), but there is a rub.

The child SWF application itself requests additional images - problem is that the file paths requested are relative. Looking at a network call trace (in browser), I see that the child SWF file now thinks it's base URL path is the base URL path of my parent SWF.

For example: my (parent) Flex app is hosted at www.xyz.com, and my "child" SWF file is hosted at www.123.com. Technically, the "child" SWF file needs to look for its resources based on a base path of www.123.com - however I see it is querying my parent app's base path, www.xyz.com. I cannot control the "child" SWF, only the containing one I am writing.

Is there any way I can override the base url path of the loaded SWF file (in SWFLoader) from within my app?

Thanks for any help! Fred.

1
Correct me if i am wrong. you are loading a module(.swf) hosted on different server right but the assets are not loading.solution for this is just add the path from where your module is loading to the assets path which are loading at run time in module. eg. www.123.com/assets/styles/style.swf - remixabhi

1 Answers

0
votes

You must decide what application domain your child module will be loaded into. Take a look at this documentation

By default, the application domain loads into the parent one, thus getting the behavior you are seeing.