如何重新启动独立的 Adobe Air/Flex 应用程序 [英] How to restart a standalone Adobe Air/Flex application
本文介绍了如何重新启动独立的 Adobe Air/Flex 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何让独立的 Adobe Air/Flex 应用程序自行重启?
它不适用于以下建议的解决方案:http://www.colettas.org/?p=267.
任何帮助都会很棒,
谢谢.
解决方案
package{导入 mx.core.Application;导入 mx.core.WindowedApplication;导入 adobe.utils.ProductManager;公共功能重启():无效{var app:WindowedApplication =WindowedApplication(Application.application);var mgr:ProductManager =新产品经理(airappinstaller");mgr.launch("-launch" +app.nativeApplication.applicationID + " " +app.nativeApplication.publisherID);app.close();}}
<块引用>
还要确保allowBrowserInvocation"选项是在 AIR 应用程序中打开描述符模板
How can I get a standalone Adobe Air/Flex application to restart itself?
It doesn't work with the suggested solution on: http://www.colettas.org/?p=267.
Any help would be great,
Thanks.
解决方案
package
{
import mx.core.Application;
import mx.core.WindowedApplication;
import adobe.utils.ProductManager;
public function reboot():void
{
var app:WindowedApplication =
WindowedApplication(Application.application);
var mgr:ProductManager =
new ProductManager("airappinstaller");
mgr.launch("-launch " +
app.nativeApplication.applicationID + " " +
app.nativeApplication.publisherID);
app.close();
}
}
Also make sure that the "allowBrowserInvocation" option is turned on in the AIR application descriptor template
"How to restart an AIR application from code"
这篇关于如何重新启动独立的 Adobe Air/Flex 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文