, , . , false. , , true. . , true .
private var boolExit:Boolean=false;
private function alertClickHandler(event:CloseEvent):void{
if(event.detail==Alert.YES){
boolExit=true;
NativeApplication.nativeApplication.exit();
}
}
private function AppExit(e:Event):void{
if(!boolExit)
e.preventDefault();
Alert.show("Do you want to exit application?",
"Exit Confirmation",
Alert.YES|Alert.NO,null,
alertClickHandler
);
}
public function init():void
{
. . .
this.addEventListener(Event.CLOSING,AppExit);
. . .
}