[英]Issue loading AS2 .swf that uses XML into AS3 .fla
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. 我正在为客户建立一个网站,他们在该网站购买了以“ AS 1.0&AS 2.0”编写的Flash模板,然后要求我将googlemap添加到“与我们联系”页面。 However, the googlemap API only works in AS3. 但是,googlemap API仅在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. 我的选择是将整个网站转换为AS3,或者制作一个AS3文件,该文件导入了AS2网站,然后添加了googlemap位。 I decided to go with option 2 since it seemed easier... Anyway, I'm using the Loader class in the AS3 file. 我决定选择选项2,因为它似乎更容易...无论如何,我在AS3文件中使用Loader类。
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 same folder
myLoader.load(url); // load the SWF file
addChild(myLoader);
The problem is the AS2 swf file uses XML to load the background images. 问题是AS2 swf文件使用XML加载背景图像。 It works on its own but when loaded into the AS3 file the background images do not appear. 它可以单独工作,但是当加载到AS3文件中时,不会显示背景图像。 All the buttons and external links work, its just the loading of the XML. 所有按钮和外部链接都可以正常工作,只是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. 我一直在寻找有关此方面的帮助,尽管有很多人在AS3中玩AS2 SWF时遇到问题,但找不到任何可帮助您的东西。 Any advise or solutions would be appreciated! 任何建议或解决方案将不胜感激! Thanks! 谢谢!
Havent face such a problem but, if you find out the problem you ca solve it. Havent面临这样的问题,但是,如果您发现问题,则可以解决。 You can check some conditions: 您可以检查一些条件:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.