March 19, 2012

Flash AS 3.0, Quit Button

To quit from a window, create two layers as button and AS. In the button layer create a button and name its instance  btn. Go to AS layer and add the below codes in it.



btn.addEventListener(MouseEvent.CLICK,a);
function a(e:MouseEvent):void {
            fscommand("quit");

}

No comments:

Post a Comment