# MX movieclip movement with deceleration?

**URL:** https://forum.kirupa.com/t/mx-movieclip-movement-with-deceleration/13905
**Category:** flash
**Created:** [February 19, 2003, 5:39pm UTC](https://forum.kirupa.com/t/mx-movieclip-movement-with-deceleration/13905 "2003-02-19T17:39:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![georgia](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@georgia](https://forum.kirupa.com/u/georgia)
#### Post date: [February 19, 2003, 5:39pm UTC](https://forum.kirupa.com/t/mx-movieclip-movement-with-deceleration/13905/1 "2003-02-19T17:39:08Z")

</div>

I have movieclip1. When I mouseDown, I want to move movieclip2 to a specific \_x position with deceleration.

I am using setProperty (\_x) of clip2 on mouseDown of clip1, and clip2 moves just fine, but how do I get the deceleration to work?

Thanks for any help,

georgia

:-\

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 19, 2003, 6:13pm UTC](https://forum.kirupa.com/t/mx-movieclip-movement-with-deceleration/13905/2 "2003-02-19T18:13:29Z")

</div>

Take a search of this site for something called “easing”…

I think you’ll find it very useful 😉

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 19, 2003, 6:57pm UTC](https://forum.kirupa.com/t/mx-movieclip-movement-with-deceleration/13905/3 "2003-02-19T18:57:32Z")

</div>

[http://www.kirupa.com/developer/mx/followease.htm](http://www.kirupa.com/developer/mx/followease.htm)

[http://www.kirupa.com/developer/mx/easing\_mouseclick.htm](http://www.kirupa.com/developer/mx/easing_mouseclick.htm)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 19, 2003, 7:09pm UTC](https://forum.kirupa.com/t/mx-movieclip-movement-with-deceleration/13905/4 "2003-02-19T19:09:03Z")

</div>

I have studied the easing tutorial, but as a newbie, I still don’t get one thing.

In the tutorial, the actions are targeting the movieclip that they are attached to. I am trying to target a different (clip2) clip and to have it move to a specific \_x coordinate with the deceleration (not follow the mouse). I have tried various experiments, but no good. Any help would be greatly appreciated.:beam:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [February 19, 2003, 11:31pm UTC](https://forum.kirupa.com/t/mx-movieclip-movement-with-deceleration/13905/5 "2003-02-19T23:31:28Z")

</div>

Well easing is an equation…

```
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;

```

endX and endY are the final destinations.

So if you set endX and endY to where you want the clip to go, it will go there.
