Actionscript multiple events

myMovieClip.addEventListener(MouseEvent.MOUSE_DOWN, onStartDrag);
myMovieClip.addEventListener(MouseEvent.MOUSE_UP, onStopDrag);
function onStartDrag(evt:MouseEvent):void {
evt.target.startDrag();
}
function onStopDrag(evt:MouseEvent):void {
evt.target.stopDrag();
}

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.