How to restart a standalone Adobe Air/Flex application

后端 未结 2 1987
灰色年华
灰色年华 2021-01-05 12:46

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.

An

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-05 13:22

    Hello dear i have been fixed this methode for Flex 4.6

    package
    {
        import adobe.utils.ProductManager;
    
        import flash.desktop.NativeApplication;
    
        import mx.core.FlexGlobals;
        import spark.components.WindowedApplication;
    
        public function Reboot():void
        {
            var app:WindowedApplication = WindowedApplication(FlexGlobals.topLevelApplication);
    
            var mgr:ProductManager = new ProductManager("airappinstaller");
            mgr.launch("-launch "+app.nativeApplication.applicationID+" "+app.nativeApplication.publisherID);
            app.close();
        }
    }
    

提交回复
热议问题