# Easing

**URL:** <https://forum.kirupa.com/t/easing/8215>\
**Category:** flash\
**Created:** [November 15, 2002, 11:18pm UTC](https://forum.kirupa.com/t/easing/8215 "2002-11-15T23:18:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdipi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mdipi/32/49_2.png) [@mdipi](https://forum.kirupa.com/u/mdipi)\
**Post date:** [November 15, 2002, 11:18pm UTC](https://forum.kirupa.com/t/easing/8215/1 "2002-11-15T23:18:32Z")

</div>

```auto

onClipEvent(load){
_x=0;
_y=0;
speed=2;
}
onClipEvent(mouseDown){
targetx=_root._xmouse;
targety=_root._ymouse;
}
onClipEvent(enterFrame){
_x+=(targetx-_x)/speed;
_y+=(targety-_y)/speed;
}

```

what do i replace to use easing on rotation, if triggard from a button? please respond.

---

<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:** [November 16, 2002, 12:17am UTC](https://forum.kirupa.com/t/easing/8215/2 "2002-11-16T00:17:04Z")

</div>

I am in a rush, can’t help too much, replace the \_x and \_y stuff with rotation…

```auto
onClipEvent (load) {
	_x = 0;
	_y = 0;
	speed = 2;
}
onClipEvent (mouseDown) {
	targetx = _root._xmouse;
	targety = _root._ymouse;
}
onClipEvent (enterFrame) {
	_rotation += (targetx-_rotation)/speed;
	_rotation += (targety-_rotation)/speed;
}

```

Try something like that.

---

<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:** [November 16, 2002, 12:41am UTC](https://forum.kirupa.com/t/easing/8215/3 "2002-11-16T00:41:26Z")

</div>

lol i replaced the wrong stuff on my try. thanks for the help. i will test it as soon as i finish my grunge pic for the battle!😛

---

<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:** [November 16, 2002, 1:16am UTC](https://forum.kirupa.com/t/easing/8215/4 "2002-11-16T01:16:39Z")

</div>

hey it worked! 😛 thanks. now to tweak it to what i want and i will be good to go.

---

<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:** [November 16, 2002, 3:39am UTC](https://forum.kirupa.com/t/easing/8215/5 "2002-11-16T03:39:50Z")

</div>

I am glad it worked, I had like 30 seconds to change and repost it…lol.

I didn’t even test it or anything, just took a shot in the dark.

---

<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:** [November 16, 2002, 1:27pm UTC](https://forum.kirupa.com/t/easing/8215/6 "2002-11-16T13:27:06Z")

</div>

Stabs in the dark work out well sometimes… 🙂

---

<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:** [November 16, 2002, 5:45pm UTC](https://forum.kirupa.com/t/easing/8215/7 "2002-11-16T17:45:22Z")

</div>

Yes… yes they do 🙂
