Hello everyone!
I am struggling with the smooth movement of my MC.
I am able to move it around, but want to make it smooth, like google maps or something like that. Right now, it looks very “abrupt” at the end. I am looking for something called drag and throw, i guess. Where when the user releases the mc, it still moves a bit until stops. But i cant use on EnterFrame, since i dont want to keep calling it over and over.
Here is the code that i am using:
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
mc_square.addEventListener(MouseEvent.MOUSE_DOWN, start_drag);
mc_square.addEventListener(MouseEvent.MOUSE_UP, stop_drag);
function mouseMoveHandler(evt:MouseEvent):void
{
//Here i have my own cursor.
//mc_my_cursor.x = evt.stageX;
//mc_my_cursor.y = evt.stageY;
}
function start_drag(e:MouseEvent):void
{
mc_square.startDrag();
}
function stop_drag(e:MouseEvent):void
{
mc_square.stopDrag();
}
Any ideas, sugestions, hints, ANYTHING, will be welcome!
Kind regards,
Leo.