# Easing in, easing out

**URL:** <https://forum.kirupa.com/t/easing-in-easing-out/57383>\
**Category:** Uncategorized\
**Created:** [July 12, 2004, 9:00pm UTC](https://forum.kirupa.com/t/easing-in-easing-out/57383 "2004-07-12T21:00:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tennis](https://avatars.discourse-cdn.com/v4/letter/t/ecae2f/32.png) [@tennis](https://forum.kirupa.com/u/tennis)\
**Post date:** [July 12, 2004, 9:00pm UTC](https://forum.kirupa.com/t/easing-in-easing-out/57383/1 "2004-07-12T21:00:12Z")

</div>

hello, i am new to the kirupa forums, though i have been following the tutorials for about a week now.

anyways i have read some tutorials about easing a movie clip to a location using AS. i have a banner about 480x130 and i am trying to ease a slogan in, and after a few seconds ease it out (on \_x axis), and then ease in the next segment of the slogan.

a good example of the effect can be seen here:

[http://www1.vivid-design.com.au/](http://www1.vivid-design.com.au/)

---

<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:** [July 12, 2004, 9:26pm UTC](https://forum.kirupa.com/t/easing-in-easing-out/57383/2 "2004-07-12T21:26:19Z")

</div>

Easing is a pretty simple concept: [Bit-101’s Easing Tutorial](http://www.bit-101.com/tutorials/easing.html)

The way it works is you find the distance you want to move on that axis, and then add on that amount divided by a number (making the amount smaller). If you iterate that loop the ampount you move gets smaller because the the distance gets smaller thus creating an easing effect. (I think Bit-101 explained it better).

```auto

//onEnterFrame
_x += (tx-_x)/5; //tx is the target x coordinate and 5 is the amount to divide by. Adjust this to change the effect

```

---

<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:** [July 12, 2004, 9:26pm UTC](https://forum.kirupa.com/t/easing-in-easing-out/57383/3 "2004-07-12T21:26:59Z")

</div>

> [@jerez\_z](#):
>
> Easing is a pretty simple concept: [Bit-101’s Easing Tutorial](http://www.bit-101.com/tutorials/easing.html)
> 
> The way it works is you find the distance you want to move on that axis, and then add on that amount divided by a number (making the amount smaller). If you iterate that loop the ampount you move gets smaller because the the distance gets smaller thus creating an easing effect. (I think Bit-101 explained it better).
> 
> ```auto
> 
> //onEnterFrame
> _x += (tx-_x)/5; //tx is the target x coordinate and 5 is the amount to divide by. Adjust this to change the effect
> 
> ```

---

<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:** [July 13, 2004, 6:08am UTC](https://forum.kirupa.com/t/easing-in-easing-out/57383/4 "2004-07-13T06:08:53Z")

</div>

Thanks J,

I understand the easing in effect pretty well. But where I get stuck is on how to ease out…I have played with it all lats ngiht with no success, I almot got it when I put a stop; on the first frame and at the end of the enterframe function I put gotoandplay(2);

with the easing out coords on that.

I ended up getting frustrated and coming here for help.

---

<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:** [July 13, 2004, 2:04pm UTC](https://forum.kirupa.com/t/easing-in-easing-out/57383/5 "2004-07-13T14:04:15Z")

</div>

for easing out you could just use acceleration (it would look the same, unless your moving to another point):

```auto

//onEnterFrame
ax = .5; //acceleration
vx += ax; //velocity
_x += vx; //adjust x accordingly

```

---

<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:** [July 13, 2004, 9:09pm UTC](https://forum.kirupa.com/t/easing-in-easing-out/57383/6 "2004-07-13T21:09:57Z")

</div>

Hey Tennis,

check this link out [http://laco.wz.cz/tween/](http://laco.wz.cz/tween/) there is really nice component the will do really cool easing for you. I have been using it, and I love it 🙂
