# How to make a smooth movement using drag?

**URL:** <https://forum.kirupa.com/t/how-to-make-a-smooth-movement-using-drag/329372>\
**Category:** flash\
**Created:** [August 19, 2012, 3:51pm UTC](https://forum.kirupa.com/t/how-to-make-a-smooth-movement-using-drag/329372 "2012-08-19T15:51:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo\_75](https://avatars.discourse-cdn.com/v4/letter/l/d07c76/32.png) [@Leo\_75](https://forum.kirupa.com/u/Leo_75)\
**Post date:** [August 19, 2012, 3:51pm UTC](https://forum.kirupa.com/t/how-to-make-a-smooth-movement-using-drag/329372/1 "2012-08-19T15:51:24Z")

</div>

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:

```auto

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.
