Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 AS3加载器导致securityError#2044,尽管有crossdomain.xml_Actionscript 3_Flash_Cross Domain - Fatal编程技术网

Actionscript 3 AS3加载器导致securityError#2044,尽管有crossdomain.xml

Actionscript 3 AS3加载器导致securityError#2044,尽管有crossdomain.xml,actionscript-3,flash,cross-domain,Actionscript 3,Flash,Cross Domain,我正在开发一个在线绘画应用程序 应用程序swf以及后端服务器位于此处: 根目录中还有一个crossdomain.xml: 我从服务器加载画布图像,如下所示: var _loader:Loader = new Loader(); //make sure it's really not comming from the cache var urlRequest:URLRequest = new URLRequest(url+'?nocache=' + new Date().getTime());

我正在开发一个在线绘画应用程序

应用程序swf以及后端服务器位于此处:

根目录中还有一个crossdomain.xml:

我从服务器加载画布图像,如下所示:

var _loader:Loader = new Loader();
//make sure it's really not comming from the cache
var urlRequest:URLRequest = new URLRequest(url+'?nocache=' + new Date().getTime());
var requestHeader1:URLRequestHeader = new URLRequestHeader("pragma", "no-cache");
var requestHeader2:URLRequestHeader = new URLRequestHeader("Expires", "Thu, 01 Jan 1970 00:00:00 GMT, -1");
var requestHeader3:URLRequestHeader = new URLRequestHeader("Cache-Control", "no-cache, no-store, must-revalidate");
urlRequest.requestHeaders.push(requestHeader1);
urlRequest.requestHeaders.push(requestHeader2);
urlRequest.requestHeaders.push(requestHeader3);
var context:LoaderContext = new LoaderContext(true);

_loader.load(urlRequest, context);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onDataLoaded);
尽管如此,当从另一个页面盗用时,swf仍然不起作用

我得到一份工作

Error #2044: SecurityErrorEvent unverarbeitet. text=Error #2170: Verletzung der Sicherheits-Sandbox: http://www.pictonauts.theaterspektakel.ch/Client.swf kann keine HTTP-Header an http://217.150.244.137/images/wall/4/img_-2_-1_4.jpg?nocache=1331058396137 senden.

我遗漏了什么或做错了什么?

首先,尝试这个crossdomain.xml:

<?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="all"/> 
    <allow-access-from domain="*" to-ports="*" secure="false" />
    <allow-http-request-headers-from domain="*" headers="*" secure="false" /> 
</cross-domain-policy>