Actionscript Code:
myMovieClip.addEventListener(MouseEvent.MOUSE_DOWN, onStartDrag);
myMovieClip.addEventListener(MouseEvent.MOUSE_UP, onStopDrag);
myMovieClip2.addEventListener(MouseEvent.MOUSE_DOWN, onStartDrag);
myMovieClip2.addEventListener(MouseEvent.MOUSE_UP, onStopDrag);
function onStartDrag(evt:MouseEvent):void {
evt.target.startDrag();
}
function onStopDrag(evt:MouseEvent):void {
stopDrag();
}
stage.addEventListener(MouseEvent.MOUSE_UP, onStopDrag);
Every thing is working well... I have a doubt in last line...
Actionscript Code:
stage.addEventListener(MouseEvent.MOUSE_UP, onStopDrag);
I know why we are using this script here. And what is happening in output after adding this script.... But i need brief explanation... can u guys help me? pls....