I'm making a website for a client where they purchased a flash template that was written in "AS 1.0 & AS 2.0" and then asked me to add a googlemap to the contact us page. However, the googlemap API only works in AS3. My options were to translate the entire website to AS3 OR to make an AS3 file that imported the AS2 website and then added the googlemap bit. I decided to go with option 2 since it seemed easier... Anyway, I'm using the Loader class in the AS3 file.
var myLoader:Loader = new Loader(); // create a new instance of the Loader class
var url:URLRequest = new URLRequest("main_v8.swf"); // in this case both SWFs are in the sa开发者_开发百科me folder
myLoader.load(url); // load the SWF file
addChild(myLoader);
The problem is the AS2 swf file uses XML to load the background images. It works on its own but when loaded into the AS3 file the background images do not appear. All the buttons and external links work, its just the loading of the XML. I've been looking all over for help on this and while there are lots of people with issues playing AS2 swf in AS3 I couldn't find anything to help with this. Any advise or solutions would be appreciated! Thanks!
Havent face such a problem but, if you find out the problem you ca solve it. You can check some conditions:
- check network for , does xml loaded. (might be crossdomain problem)
- check if images loaded. ( as3 security problem)
- check as2 file really inits. ( you can use as3 bridge to as2)
精彩评论