[AS][转]AS3 中单击、双击事件处理
private var timer:Timer; timer = new Timer(250,1); timer.addEventListener(TimerEvent.TIMER, timerHandler); mc.addEventListener(MouseEvent.CLICK,togglePlayPause); public function togglePlayPause(event:MouseEvent):void{ if(timer.running){ timer.stop(); doubleClickFunc();//调用双击响应函数 }else{ timer.start(); } } private function timerHandler(event:TimerEvent):void{ clickFunc();//调用单击响应函数 }