# Drag and drop with ease

**URL:** <https://forum.kirupa.com/t/drag-and-drop-with-ease/316558>\
**Category:** flash\
**Created:** [November 25, 2010, 2:42pm UTC](https://forum.kirupa.com/t/drag-and-drop-with-ease/316558 "2010-11-25T14:42:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danieldmm](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@danieldmm](https://forum.kirupa.com/u/danieldmm)\
**Post date:** [November 25, 2010, 2:42pm UTC](https://forum.kirupa.com/t/drag-and-drop-with-ease/316558/1 "2010-11-25T14:42:47Z")

</div>

Here’s the code I’m using to drag an object and I wonder how could I make the movement to be “eased” when I release the mouse (MOUSE\_UP) I’ve been thinking of using Caurina Tweener or Grant’s Tweener? Any help???

```php

import flash.display.MovieClip;
import flash.events.MouseEvent;

wave_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
wave_mc.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
stage.addEventListener(Event.MOUSE_LEAVE, simulateRelease);

var rectangle:Rectangle = new Rectangle(0,0,1300,4100);

function mouseDownHandler(evt:MouseEvent):void
{
    var object = evt.target;
    object.startDrag(false, rectangle);
}

function mouseUpHandler(evt:MouseEvent):void
{
    var obj = evt.target;
    obj.stopDrag();
}

function simulateRelease(event:Event):void
{
    stopDrag();
}

```
