Undefined Property
I am developing an android game.This is an actionscript for exit popup.
I keep getting this error 1120 : Access of undefined property Native Application
CODE :
import flash.events.MouseEvent;
MC1.visible = false;
//Movieclip name declared as MC1
btn_exit.addEventListener(MouseEvent.CLICK, onExit);//Exit Button on menu
function onExit(event:MouseEvent):void
{
MC1.visible = true;
}
//Function on Button click
MC1.YesBtn.addEventListener(MouseEvent.CLICK, onYes);
function onYes(event:MouseEvent):void
{
NativeApplication.nativeApplication.exit();
}
MC1.NoBtn.addEventListener(MouseEvent.CLICK, onNo);
function onNo(event:MouseEvent):void
{
MC1.visible = false;
}
