简体   繁体   English

AS3未加载crossdomain.xml

[英]AS3 is not loading crossdomain.xml

I have this code: 我有以下代码:

var advert:Loader = new Loader();
var url:URLRequest = new URLRequest(root.loaderInfo.parameters.video_src);
var context:LoaderContext = new LoaderContext();
context.checkPolicyFile = true;
context.securityDomain = SecurityDomain.currentDomain;
context.applicationDomain = ApplicationDomain.currentDomain;
advert.load(url, context);

For some reason there is no packet at all for the crossdomain.xml query 由于某种原因,crossdomain.xml查询根本没有数据包

Also i get this error: 我也得到这个错误:

Error #2044: Unhandled SecurityErrorEvent:. 错误#2044:未处理的SecurityErrorEvent :。 text=Error #2048: Security sandbox violation: http://edomain.com/flashfile.swf?t=1413815793214 cannot load data from text =错误#2048:违反安全沙箱: http : //edomain.com/flashfile.swf? t= 1413815793214无法从中加载数据

And this is the crossdomain that should be loaded: 这是应该加载的跨域:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-access-from domain="*" />
</cross-domain-policy>

have you tried using an URLLoader to download the SWF and use loadBytes on the Loader with the data returned? 您是否尝试过使用URLLoader下载SWF,并在Loader上使用loadBytes并返回了数据? That way you can bypass the securityDomain check and still force it to use SecurityDomain.currentDomain (as that's what used for loadBytes and can't even be changed) 这样,您可以绕过securityDomain检查并仍然强制其使用SecurityDomain.currentDomain(因为这是用于loadBytes的,甚至不能更改)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM