从链接加载的外部swf在某些浏览器中不起作用

时间:2016-08-15 20:29:47

标签: actionscript-3 flash firefox flash-cs6

我正在开发一款由于其扩展需要加载外部swf的游戏。这个游戏是在一些Flash门户网站上,并从urlrequest和loader加载这些外部swf。像Chrome或Opera这样的浏览器正在加载这些外部swf完全正常,但我遇到了Firefox的问题(而且我不确定是否也使用Microsoft Edge)。在Firefox上运行游戏的所有玩家无法从链接(http地址)加载外部swf。 我在(主要和外部)swf文件中正确添加了“allowDomain”和“allowInsecureDomain”。

问题是什么?带有外部http地址的Firefox安全设置?有什么办法可以解决吗?

任何帮助将不胜感激!

编辑:这是我使用的代码:

//on the 1st frame of my main .fla
import flash.system.Security;

Security.allowDomain("*");
Security.allowInsecureDomain("*");

//on the frame I want to load the external file

var ldr:Loader = new Loader();
var bytesLoaded;
var bytesTotal;
var scene01:MovieClip;
var percentLoaded:Number = bytesLoaded/bytesTotal;

function progressListener (e:ProgressEvent):void{
trace("Downloaded " + e.bytesLoaded + " out of " + e.bytesTotal + " bytes");
percentLoaded = Math.round(percentLoaded * 100);
}


ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadfile);
ldr.load(new URLRequest("http://img110.xooimage.com/files/e/7/e/external_file.swf"));

ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);

function loadfile(e:Event):void {
scene01 = MovieClip(ldr.contentLoaderInfo.content);
ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, loadfile);
addChild(scene01);
scene01.gotoAndPlay(2);
}

0 个答案:

没有答案
相关问题