/ Published in: ActionScript 3
Expand |
Embed | Plain Text
private function init():void { theDragClip.addEventListener( MouseEvent.MOUSE_DOWN, handleStartDrag); theDragClip.addEventListener( MouseEvent.MOUSE_UP, handleStopDrag); } private function handleStartDrag(e:MouseEvent) { //if (e.target == stage) { theDragClip.startDrag(); stage.addEventListener(MouseEvent.MOUSE_UP, handleStopDrag); //} } private function handleStopDrag(e:MouseEvent){ theDragClip.stopDrag(); stage.removeEventListener(MouseEvent.MOUSE_UP, handleStopDrag); }
You need to login to post a comment.
