Trying to prevent the application from shutting down when clicked the X button, it still closing but the AIR process is running in the task manager. What wrong with the code?
Application Complete:
NativeApplication.nativeApplication.addEventListener(Event.EXITING, onExiting);
Closing code:
private function onExiting(e:Event):void
{
e.preventDefault();
}
Try
Event.CLOSING. That’s what I use to cancel closing.Event.EXITINGhappens after the window is removed and should be used only for cleanup, and not to prevent the application from closing.From the docs:
Sample “unclosable” application:
Good luck,
Alin