Actionscript 3 AS3:退出桌面flash播放器
如何使用Actionscript 3退出桌面flash playerActionscript 3 AS3:退出桌面flash播放器,actionscript-3,flash,exit,Actionscript 3,Flash,Exit,如何使用Actionscript 3退出桌面flash player System.exit(0); 导致 SecurityError:Error#2018:System.exit仅在中可用 独立的Flash播放器 在Flash CS6中预览项目和在Flash Player调试器中播放导出的swf文件时都会出现此错误。Flash Player和单机版之间存在差异 导出fla时,导出由flash player播放的swf。这不是孤立的 只需编译它,然后进入文件->创建投影仪。现在它是一个独立的系
System.exit(0);
导致
SecurityError:Error#2018:System.exit仅在中可用
独立的Flash播放器
在Flash CS6中预览项目和在Flash Player调试器中播放导出的swf文件时都会出现此错误。Flash Player和单机版之间存在差异 导出fla时,导出由flash player播放的swf。这不是孤立的 只需编译它,然后进入文件->创建投影仪。现在它是一个独立的系统。退出(0)应该可以工作。您可以使用
fscommand("quit");
这将终止您的swf
不要忘记导入fscommand:
import flash.system.fscommand;
那么:
NativeApplication.nativeApplication.exit();
我创建了一个.exe和.app文件,并在Windows和OSX上进行了测试,但都不起作用。它只是回到项目的开始。我想让它把窗户关上。