[@more@]setSquare.addEventListener(MouseEvent.MOUSE_DOWN, StartMove);setSquare.addEventListener(MouseEvent.MOUSE_UP, StopMove);rotation_btn.addEventListener(MouseEvent.MOUSE_DOWN, StartRotation);rotation_btn.addEventListener(MouseEvent.MOUSE_UP, StopRotation);function StartMove(event:MouseEvent){ setSquare.startDrag(true);}function StopMove(event:MouseEvent){ setSquare.stopDrag();}//如果滑鼠按下按鈕,就開始旋轉function StartRotation(event:MouseEvent){ stage.addEventListener(Event.ENTER_FRAME,addnum);}//增加旋轉角度function addnum(event:Event):void{ setSquare.rotation += 1;}//滑鼠放開按鈕時,結束旋轉function StopRotation(event:MouseEvent){ stage.removeEventListener(Event.ENTER_FRAME,addnum);}