# Easing movement using actionscript

**URL:** <https://forum.kirupa.com/t/easing-movement-using-actionscript/200745>\
**Category:** flash\
**Created:** [September 14, 2006, 7:07pm UTC](https://forum.kirupa.com/t/easing-movement-using-actionscript/200745 "2006-09-14T19:07:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![will2](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/will2/32/2815_2.png) [@will2](https://forum.kirupa.com/u/will2)\
**Post date:** [September 14, 2006, 7:07pm UTC](https://forum.kirupa.com/t/easing-movement-using-actionscript/200745/1 "2006-09-14T19:07:14Z")

</div>

I just followed [this tutorial](http://www.kirupa.com/developer/actionscript/tween.htm) and I did get how it all worked… and i got my movie clip flying arround the stage.

Then when i tried to apply it to a little project i’m working on, i couldn’t get it working.

I have a movie clip called \*mc\_main \*and when i click a button I want it to move - using easing - to a new position on the stage.

In the first frame of my timeline i have put this AS:

```auto
stop();
/*IMPORTS EASING FUNCTION*/
import mx.transitions.Tween;
import mx.transitions.easing.*;
var MoveHome:Tween = new Tween(mc_main, "_x", Regular.easeInOut, 245, 140, 3, true);

```

Where I am a bit stuck is how to make that ease happen when i click on the button, not when the movie loads…

Also, as I am bound to get stuck on this later; the movie clip _mc\_main_ is not always going to start in the same position. So it has to find its current position first, and then move to the new one…

Any help with this would be great.
