Actionscript 3 从不同域在as3中加载as2

Actionscript 3 从不同域在as3中加载as2,actionscript-3,actionscript,Actionscript 3,Actionscript,我尝试这样加载swf: var _mcl:Loader= new Loader(); var loader_context:LoaderContext= new LoaderContext(); loader_context.securityDomain= SecurityDomain.currentDomain; _mcl.load(new URLRequest(p_url), loader_context); _mcl.contentLoaderInfo.addEventListener(E

我尝试这样加载swf:

var _mcl:Loader= new Loader();
var loader_context:LoaderContext= new LoaderContext();
loader_context.securityDomain= SecurityDomain.currentDomain;
_mcl.load(new URLRequest(p_url), loader_context);
_mcl.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadImageComplete);
_mcl.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadImageError);
_mcl.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onLoadImageError);
但问题是,一些swf在AS2中,它们的脚本在最后一帧未执行且电影循环时不会执行简单的停止

如果我删除 loader\u context.securityDomain=securityDomain.currentDomain; 它可以工作,AS2文件脚本被执行,但是flash会为来自不同域的swf抛出一个安全错误

所以我想知道在AS3文件中是否有方法从另一个域加载AS2 swf


谢谢

如果您有访问权限,跨域策略文件不能解决问题吗

您好,有这样一个crossdomain.xml文件:所以如果没有SecurityDomain,它会抛出一个异常,但随后会工作?