Actionscript 3 关闭选项卡和can中的SWF时出现逻辑错误';t使用ExternalInterface AS3打开新html

Actionscript 3 关闭选项卡和can中的SWF时出现逻辑错误';t使用ExternalInterface AS3打开新html,actionscript-3,flash-cs5,Actionscript 3,Flash Cs5,当我想通过ExternalInterface关闭firefox中的tab时,我遇到了一个逻辑错误,奇怪的是,我的输出和编译器中没有出现任何错误 import flash.events.MouseEvent; import flash.system.fscommand; import flash.external.ExternalInterface; letsPlay.addEventListener(MouseEvent.MOUSE_DOWN, loadIntro); function lo

当我想通过ExternalInterface关闭firefox中的tab时,我遇到了一个逻辑错误,奇怪的是,我的输出和编译器中没有出现任何错误

import flash.events.MouseEvent;
import flash.system.fscommand;
import flash.external.ExternalInterface;

letsPlay.addEventListener(MouseEvent.MOUSE_DOWN, loadIntro);

function loadIntro(e:MouseEvent){
    sndStart.play();
    sndmChannel.stop();
    //System.exit(0);
    fscommand("quit");
    ExternalInterface.call("window.open","http://localhost/GAME_FLASH/stage1/stage1story.html","_blank");
    ExternalInterface.call("closeWindow");
}

Firefox不会关闭选项卡,也不会在新窗口中显示所需的html,我已经检查了所有内容,包括我的html页面。所有的“import flash.bla bla”都是完整的,没有任何问题

“closeWindow”的JS代码是什么?@Kevin McGowan它包含在:window.close()中您试图关闭的选项卡是否已被脚本打开(使用window.open)?否则,Firefox将拒绝关闭窗口。这是一项安全功能,至少由Firefox和Chrome实现。@Aralicia Errr不,该选项卡不是由脚本打开的,我通常只打开一个新选项卡并打开flash html,当我单击“letsPlay”符号打开新URL并关闭当前选项卡时,ExternalInterface.call似乎根本不起作用;那么你就不能用脚本来关闭它。正如我所说,这是大多数浏览器的安全功能。遗憾的是,你想做的事是不可能的。