Restart Air Application With AS3 & Flex 4.5


/ Published in: ActionScript 3
Save to your folder(s)

I was struggling to find a way to restart an Adobe Air application programmed using flex 4.5 and AS3, this is a modification of code found around the web.


Copy this code and paste it in your HTML
  1. public function reboot():void {
  2.  
  3. var app:WindowedApplication = FlexGlobals.topLevelApplication as WindowedApplication;
  4. var mgr:ProductManager = new ProductManager("airappinstaller");
  5. mgr.launch("-launch " + app.nativeApplication.applicationID + " " + app.nativeApplication.publisherID);
  6. app.close();
  7.  
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.