import flash.system.fscommand; exit1.addEventListener(MouseEvent.CLICK, clickHandler); function clickHandler(event:MouseEvent):void { fscommand("quit"); }