0 Replies Latest reply on Jun 12, 2010 2:07 PM by exerter

    Clean up task before terminating app


      How can i perform certain clean up task before exiting after the user click 'x' or alt-f4?



      function applicationExit(){ 
          var exitingEvent = new air.Event(air.Event.EXITING, false, true);
          if (!exitingEvent.isDefaultPrevented()) air.NativeApplication.nativeApplication.exit();
      I cant really understand this code, i want to load a url before the user really exits the program.