Follow Me On

 

https://www.youtube.com/user/mrsumitranaware

https://www.instagram.com/sumit.ranaware/

https://sumalno.wordpress.com/

https://www.facebook.com/suma.lno/

Advertisements

Movie Clip Drag Tutotial AS3

 

Make a movie clip and give in an instance name “mc”.
click on the frame in the timeline and press F9.

and past the following code :

mc.addEventListener (MouseEvent.MOUSE_DOWN, start_drag);
function start_drag (e:Event){

mc.startDrag();

}

 

this will allow to drag the movie clip, now we also need to give it an action as stop drag when mouse click in disable.

mc.addEventListener (MouseEvent.MOUSE_UP, stop_drag);
function stop_drag (e:Event){

mc.stopDrag();

}

 

Hope you got it. 🙂