将 xml 中命名的 swf 加载到 Actionscript 3 中的父 swf 中
好的,我有一种情况,我使用 loadvars 加载一个 xml 文件,该文件在服务器上有 2 个 swf 的地址。我可以跟踪 xml 项目,以便知道它们正在加载。所以我尝试加载 swf,但遇到了问题。第一个问题,当我从 flash 发布时,swf 总是给出错误,“TypeError: Error #2007: Parameter url must be non-null”。因为它找不到 xml 文件的提及,因为它刚刚发布。我不确定这会影响下一个问题,即当我尝试像这样加载它时,swf 未加载:
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest(loadswf1); // where I know loadswf1 = "myswf.swf"
loader.load(defaultSWF);
任何建议表示赞赏, 谢谢
OK, I have a situation where I use loadvars to load an xml file, which has the address of 2 swf's on the server. I can trace the xml items so know they are loading. So I'm trying to load the swf's but am running into problems. First problem, the swf always gives an error when I publish from flash, "TypeError: Error #2007: Parameter url must be non-null." as it can't find the mention of the xml file, as it's just being published. I'm not sure this affects the next issue which is the swf not loading when I try to load it like this:
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest(loadswf1); // where I know loadswf1 = "myswf.swf"
loader.load(defaultSWF);
any advice appreciated,
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,如果我说的是显而易见的事情,但可供参考的代码很少...您是否在 XML 加载完成后开始加载 SWF?
Sorry if I'm stating the obvious but there's very little code to go by... Are you starting to load your SWFs after the XML loading has completed?