Flash actionscript 3.0: if you want to move a object with mouse Pointer

if you want to move a object with mouse Pointer

Posted by Sankar.G | Posted in | Posted on 9:20 AM

If you want to move a object along with mouse pointer in Action script 3.0

code: parent.addEventListener(Event.ENTER_FRAME,fun);
function fun(e:Event)
{
movie_mc.startDrag(true);
}
flash.ui.Mouse.hide();
moive_mc.buttonMode=true;

this is the code to move a object along with mouse pointer
Explanitation:
parent is the screen in the actionscrpit 3.0 we want to mention parent for the screen
e is used to capture the ENTER_FRAME event & movie_mc in the name of a movie clip startDrag is used to move a movieclip along with mouse pointer & true is used to set correct position of the movieclip with mouse pointer X & Y axis and flash.ui.Mouse.hide() is used to hide the mouse pointer ui=userInterface devices buttonmode=true is used to change that movie clip to a mouse pointer

Comments (0)