How do I launch an EXE from Flash SWF using Action

2019-07-04 11:06发布

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条回答
Juvenile、少年°
2楼-- · 2019-07-04 11:50

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.

查看更多
登录 后发表回答