How do I launch an EXE from Flash SWF using ActionScript?

我们两清 提交于 2019-12-10 20:12:13

问题


I want my Flash SWF to open an external EXE from the native operating system and I have tried:

protected function LaunchExe():void {
    flash.system.fscommand("exec","Test.exe");
}

But nothing happens. Am I doing something wrong with this command or do I need to something entirely differently?


回答1:


It works only from within a projector file (executable Flash), and if you are running it like that, the application you are trying to launch should be in a subdirectory called fscommand.

From Adobe:

The exec command runs in the subdirectory fscommand only. In other words, if you use the exec command to call an application, the application must reside in a subdirectory named fscommand. The exec command works only from within a Flash projector file.



来源:https://stackoverflow.com/questions/19551543/how-do-i-launch-an-exe-from-flash-swf-using-actionscript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!