PDA

View Full Version : [AS3] quit button


vyas
02-25-2009, 10:59 PM
Hi,
I am using the following script to quit the swf application. It does not work. Please advise. Thank you:(



exit_btn.addEventListener(MouseEvent.CLICK, exitClick);
function exitClick(event:MouseEvent) {
fscommand("quit");
}

Heloed
02-26-2009, 01:58 AM
Did you use import flash.system.fscommand;?

vyas
02-26-2009, 06:05 PM
I included the script import flash.system.fscommand;
as suggested but it does not make any difference.
I notice that when i test movie, it does not close or quit; however, when i open the swf file in flash player, and then click on exit button, it quits.

Please advise

CyanBlue
02-26-2009, 06:08 PM
If this is for the projector, you have to create a projector to test that... Test movie inside the Flash IDE won't do the job for you...