var loader:Loader=new Loader();
loader.load(new URLRequest("路径"),new LoaderContext(false,ApplicationDomain.currentDomain));
如果主项目加载小项目的swf的时候,就最好写上这个,能防止跨域读取swf的问题。
本文介绍了一种解决Flash在加载外部SWF文件时遇到的跨域问题的方法。通过使用特定的加载器设置,可以有效地避免因跨域限制导致的内容加载失败。
loader.load(new URLRequest("路径"),new LoaderContext(false,ApplicationDomain.currentDomain));
如果主项目加载小项目的swf的时候,就最好写上这个,能防止跨域读取swf的问题。
281

被折叠的 条评论
为什么被折叠?
