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 为什么flash只在一种情况下阻止我加载跨域swf?_Actionscript 3_Flash - Fatal编程技术网

Actionscript 3 为什么flash只在一种情况下阻止我加载跨域swf?

Actionscript 3 为什么flash只在一种情况下阻止我加载跨域swf?,actionscript-3,flash,Actionscript 3,Flash,这项工作: OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at https://foo.com/flash/flash.swf by requestor from http://bar.com/flash/old.swf OK: Searching for <allow-access-from> in policy files to

这项工作:

OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at https://foo.com/flash/flash.swf by requestor from http://bar.com/flash/old.swf
OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at https://foo.com/flash/flash.swf by requestor from http://bar.com/flash/old.swf
OK: Policy file accepted: https://foo.com/crossdomain.xml
OK: Request for resource at https://foo.com/flash/flash.swf by requestor from http://bar.com/flash/old.swf is permitted due to policy file at https://foo.com/crossdomain.xml

问题可能是因为您正在加载的SWF的源URL中有一些空白。在开始或结束时,不确定是哪个问题,但这会导致flash加载crossdomain.xml,然后出现安全错误。对flash来说是的。

您编译的新旧flash播放器版本是否不同?不,我们编译它们时使用的目标播放器和flash版本是相同的。它们仍在使用,并且以相同的方式编译。一个比另一个存在的时间更长。无论如何,有些东西必须是不同的。您能否编译与旧swf相同的内容,并查看它是否正常工作?
OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at
    https://foo.com/flash/flash.swf
     by requestor from http://bar.com/flash/new.swf
OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at
    https://foo.com/flash/flash.swf
     by requestor from http://bar.com/flash/new.swf
Warning: [strict] Policy file requested from
    https://foo.com/crossdomain.xml redirected to https://foo.com/crossdomain.xml; will use final URL in determining scope.  See http://www.adobe.com/go/strict_policy_files if this causes problems.
OK: Policy file accepted: https://foo.com/crossdomain.xml
Error: Request for resource at
    https://foo.com/flash/flash.swf
     by requestor from http://bar.com/flash/new.swf is denied due to lack of policy file permissions.
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" secure="false"/>
<allow-http-request-headers-from domain="*" headers="*" secure="false"/>
</cross-domain-policy>
var strURL:String = this.videoParameters.media_url;
// replace [timestamp]
strURL = strURL.replace(
    "[timestamp]", 
    (new Date()).valueOf().toString()
);
// use LoaderContext for domain security
this._oSWFApplicationDomain = new ApplicationDomain();
var oContext : LoaderContext = new LoaderContext(
    false, 
    this._oSWFApplicationDomain, // ApplicationDomain must be separate
    SecurityDomain.currentDomain
    );

this._oSWF = new Loader();

var oLoader:LoaderInfo = this.oSWF.contentLoaderInfo;

// start media load timeout
this._oManager.startMediaTimer();

// listen for when the SWF completely loads itself
oLoader.addEventListener(
    Event.COMPLETE, 
    this.onLoadComplete,
    false,
    0,
    true
); 

// listen for any error that may occur while trying to load
oLoader.addEventListener(
    IOErrorEvent.IO_ERROR, 
    this.onLoadError,
    false,
    0,
    true
);

var oURLRequest : URLRequest = new URLRequest(strURL);

this.oSWF.load(oURLRequest, oContext);