从代码重新启动AIR MacOS Captive运行时捆绑应用程序
有人能告诉我怎么重新启动吗 我找到了此示例,并尝试对其进行调整:从代码重新启动AIR MacOS Captive运行时捆绑应用程序,macos,actionscript-3,air,Macos,Actionscript 3,Air,有人能告诉我怎么重新启动吗 我找到了此示例,并尝试对其进行调整: var appLauncher:File; appLauncher = new File(File.applicationDirectory.nativePath).parent.parent.resolvePath("Contents").resolvePath("MacOS").resolvePath("FlashApp"); var npInf
var appLauncher:File;
appLauncher = new File(File.applicationDirectory.nativePath).parent.parent.resolvePath("Contents").resolvePath("MacOS").resolvePath("FlashApp");
var npInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo;
npInfo.executable = appLauncher;
var _args:Vector.<String> = new Vector.<String>;
npInfo.arguments = _args;
var np:NativeProcess = new NativeProcess;
np.start(npInfo);
np.exit();
var-appLauncher:File;
appLauncher=新文件(File.applicationDirectory.nativePath).parent.parent.resolvePath(“内容”).resolvePath(“MacOS”).resolvePath(“FlashApp”);
var npInfo:NativeProcessStartupInfo=新的NativeProcessStartupInfo;
npInfo.executable=appLauncher;
变量参数:向量新向量。;
npInfo.arguments=_args;
var np:NativeProcess=新的NativeProcess;
np.start(npInfo);
np.exit();
但是我不明白它应该怎么工作。。现在,当这个函数调用我的一个类时,什么也没有发生。你用ADL试过吗?还是使用实际打包/安装的应用程序 它与它的包结构有关。 如果你尝试ADL,它可能不起作用 而且
- “FlashApp”必须更改为应用程序的名称
- 最后一行应该是
exit()您的
本地应用程序的code>,而不是
np.exit()