アプリを終了させる

stage.addEventListener(Event.DEACTIVATE , onDeactivateHandler);
private function onDeactivateHandler(event:Event):void
{
    NativeApplication.nativeApplication.exit();
}