我正在尝试“打开”一个外部SWF文件(而不是加载它),如果一个按钮被点击。我想像windows用户点击打开它一样打开它,我试着使用fscommand来实现:
import flash.system.fscommand;
openSwfFileButton.addEventListener(MouseEvent.CLICK, openFile);
function openFile(e:MouseEvent){
fscommand("exec", "file.swf");
}但是它不工作,也不会抛出错误,你知道为什么吗?
发布于 2018-03-15 15:49:46
在Air项目中,您可以使用以下代码在操作系统默认应用程序中运行目标文件:
File.applicationDirectory.resolvePath("file.swf").openWithDefaultApplication();关于https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html
https://stackoverflow.com/questions/49285416
复制相似问题