1 Reply Latest reply on Oct 27, 2009 10:36 AM by dingoshark

    Event.EXITING does not work

    dingoshark Level 1

      Hi, the Event:EXITING does not get triggered when I close the application. I need save data to some files before the application closes.

      I only see "exit" in the output window like 1 out of 5 times. What is going on?

       

      // my document class

      public class Main extends MovieClip

      {

           public function Main()

           {

                NativeApplication.nativeApplication.addEventListener(Event.EXITING, onAppExit);

           }

       

       

           private function onAppExit(e:Event):void

           {

                trace("exit");

           }

      }