Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.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 Actionscript 3-多个navigateToURL()触发多个授权弹出窗口_Actionscript 3_Flash_Navigatetourl - Fatal编程技术网

Actionscript 3 Actionscript 3-多个navigateToURL()触发多个授权弹出窗口

Actionscript 3 Actionscript 3-多个navigateToURL()触发多个授权弹出窗口,actionscript-3,flash,navigatetourl,Actionscript 3,Flash,Navigatetourl,我必须在文件://protocol上的swf中执行多个navigateToURL(因此我不能使用ExternalInterface)。 不幸的是,我无法将此swf设置为受信任。 我正在使用以下代码: var urls:Array = [ 'file:///tmp/1', 'file:///tmp/2', 'file:///tmp/3' ]; var timer:Timer = new Timer(300, urls.length); timer.addEventListener(TimerEv

我必须在文件://protocol上的swf中执行多个navigateToURL(因此我不能使用ExternalInterface)。 不幸的是,我无法将此swf设置为受信任。 我正在使用以下代码:

var urls:Array = [
'file:///tmp/1',
'file:///tmp/2',
'file:///tmp/3'
];

var timer:Timer = new Timer(300, urls.length);
timer.addEventListener(TimerEvent.TIMER, onTimer);
function onTimer(e:TimerEvent):void {
    navigateToURL(new URLRequest(urls[timer.currentCount - 1]), '_blank');
}
timer.start();
不幸的是,当navigateToURL()在不受信任的swf中使用时,请在这样的弹出窗口中请求权限

有了这段代码,每次执行navigateToURL时都会出现这个弹出窗口,在我的例子中是3次,它使程序无法使用。我以为flash的设计目的是只请求一次权限


有一种解决方案可以避免这种行为?

您是否能够将本地播放安全沙箱设置为“本地与internet”?实际上,它是设置为本地与文件系统。你是说本地网络沙箱吗?这难道不会让我根本无法使用file://吗?是的,我是说
本地联网
,但你是对的,我不确定这是否会阻止
文件://
URL。不过,我还是会尝试一下,因为通常
local with filesystem
会将“启用internet的环境”(即任何浏览器)视为internet调用,而
local with networking
则允许自由调用。不幸的是,如果我选择local with,则不允许在文件://上请求-networking@RIcapitolo什么是“tmp”?网络总监?或者只是swf旁边的一个目录?