# Ease to help

**URL:** <https://forum.kirupa.com/t/ease-to-help/33637>\
**Category:** Uncategorized\
**Created:** [October 21, 2003, 9:43pm UTC](https://forum.kirupa.com/t/ease-to-help/33637 "2003-10-21T21:43:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanman918](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sanman918](https://forum.kirupa.com/u/sanman918)\
**Post date:** [October 21, 2003, 9:43pm UTC](https://forum.kirupa.com/t/ease-to-help/33637/1 "2003-10-21T21:43:58Z")

</div>

Hey, I’m trying to do the ease to effect where it slows down as it gets closer to the certain area. What i have is a white box with an instance name of nav. I have 5 buttons. When I click a button i want the white box to ease to these certain X, Y. So when someone clicks on 1 of the 5 buttons it goes to a certain X, y. Each of the 5 buttons takes it to a different location. I’ve tried a variety of actionscipting and each one is unsuccesful. How can I acheive this 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:** [October 21, 2003, 10:24pm UTC](https://forum.kirupa.com/t/ease-to-help/33637/2 "2003-10-21T22:24:37Z")

</div>

on your button:  
[AS]on (release) {  
\_global.tarX = 250;  
\_global.tarY = 150;  
}[/AS]  
where tarX,tarY is the target position of your mc, so you can change this for the other buttons.  
and on your mc:  
[AS]onClipEvent (load) {  
\_global.tarX = 50;  
\_global.tarY = 50;  
}  
onClipEvent (enterFrame) {  
this.\_x += (tarX-\_x)/5;  
this.\_y += (tarY-\_y)/5;  
}[/AS]

more on easing:  
search the forums  
[Robert Penner](http://www.robertpenner.com/index2.html)

scotty:}

---

<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:** [October 22, 2003, 12:25am UTC](https://forum.kirupa.com/t/ease-to-help/33637/3 "2003-10-22T00:25:15Z")

</div>

thanks man, I owe ya one.

---

<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:** [October 22, 2003, 6:56am UTC](https://forum.kirupa.com/t/ease-to-help/33637/4 "2003-10-22T06:56:04Z")

</div>

no problem

---

<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:** [October 22, 2003, 9:47pm UTC](https://forum.kirupa.com/t/ease-to-help/33637/5 "2003-10-22T21:47:51Z")

</div>

the site im working on is [www.obsidian-hosting.com](http://www.obsidian-hosting.com) if you want to check it out, its not done but its getting there.

---

<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:** [October 23, 2003, 5:54pm UTC](https://forum.kirupa.com/t/ease-to-help/33637/6 "2003-10-23T17:54:51Z")

</div>

> \*Originally posted by scotty \*  
> \*\*on your button:  
> [AS]on (release) {  
> \_global.tarX = 250;  
> \_global.tarY = 150;  
> }[/AS]  
> where tarX,tarY is the target position of your mc, so you can change this for the other buttons.  
> and on your mc:  
> [AS]onClipEvent (load) {  
> \_global.tarX = 50;  
> \_global.tarY = 50;  
> }  
> onClipEvent (enterFrame) {  
> this.\_x += (tarX-\_x)/5;  
> this.\_y += (tarY-\_y)/5;  
> }[/AS]

more on easing:  
search the forums  
[Robert Penner](http://www.robertpenner.com/index2.html)

scotty:} \*\*

Scotty, thank you very much, funny i am having such a huge problem. I currently switched over to Flash MX 2004 and my code to simply make movielcips move doesn’t work anymore. Gettin kinda cranky, but wait, behold, this code works fine, no AS errors.

Thanks Mang  
🥚

---

<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:** [October 23, 2003, 6:05pm UTC](https://forum.kirupa.com/t/ease-to-help/33637/7 "2003-10-23T18:05:51Z")

</div>

LOL, you’re welcome:smirk:

scotty
