Return to Snippet

Revision: 9328
at October 30, 2008 10:45 by chrisaiv


Initial Code
this.nativeWindow.addEventListener(Event.CLOSING,
  function(e:Event):void
  { 
    e.preventDefault();
    for (var i:int = NativeApplication.nativeApplication.openedWindows.length - 1; i >= 0; --i)
    { 
      NativeWindow(NativeApplication.nativeApplication.openedWindows[i]).close();
    } 
  });

Initial URL

                                

Initial Description
If you don't do this, then there's a chance that a user will quit the program but windows will still be viewable.

Initial Title
AIR: Closing all possible Windows before the Application Quits

Initial Tags

                                

Initial Language
ActionScript 3