# Easing and original position ~\_~

**URL:** https://forum.kirupa.com/t/easing-and-original-position--/22354
**Category:** Uncategorized
**Created:** [June 3, 2003, 6:06am UTC](https://forum.kirupa.com/t/easing-and-original-position--/22354 "2003-06-03T06:06:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![OniHime](https://avatars.discourse-cdn.com/v4/letter/o/3ab097/32.png) [@OniHime](https://forum.kirupa.com/u/OniHime)
#### Post date: [June 3, 2003, 6:06am UTC](https://forum.kirupa.com/t/easing-and-original-position--/22354/1 "2003-06-03T06:06:49Z")

</div>

ok… I gave up ~\_~

I want to make an easing effect on mouse follow over the Y axis… well, this was easy… thanks to Kirupa’s tutorial… but… lets say, I want the object to go back to its original position when the mouse rolls out… it might be a rollOut statment… but dunno how the AS should be look like :\*(

Any suggestions?

Thanks

OniHime

---

<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: [June 3, 2003, 8:38am UTC](https://forum.kirupa.com/t/easing-and-original-position--/22354/2 "2003-06-03T08:38:47Z")

</div>

I played around with AS…_found some hints over the forum ^\_^v_ and i think it worked out… but it seems there is something wrong whenever i try to move the mouse upwards… :x

thanks

OniHime

---

<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: [June 3, 2003, 12:24pm UTC](https://forum.kirupa.com/t/easing-and-original-position--/22354/3 "2003-06-03T12:24:08Z")

</div>

All you have to do is make the clip ease to aposition that you’ve stored somewhere, no?

pom :phil:

---

<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: [June 3, 2003, 4:00pm UTC](https://forum.kirupa.com/t/easing-and-original-position--/22354/4 "2003-06-03T16:00:49Z")

</div>

:\*(

I dont quite really got ur hint ~\_~ still new to AS…

Thanks

OniHime

---

<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: [June 3, 2003, 4:18pm UTC](https://forum.kirupa.com/t/easing-and-original-position--/22354/5 "2003-06-03T16:18:01Z")

</div>

lol… well… posting a reply to ilyaslamasse made my script work XD

Thanks ilyaslamasse ^^ i think i got ur hint… here’s the AS:

[AS]  
onClipEvent (load) {  
\_root.\_y = 0;  
}

onClipEvent (enterFrame) {  
if (\_root.px) {  
if (\_root.\_ymouse \> 20) {  
endY = 20;  
\_y += (endY-\_y)/5;  
}

```
				if (_root._ymouse &lt; 50) {
					endY = 50;
					_y -= (endY+_y)/5;
				}
			}

else{
	newy = _root.px._y+_root.dist;
		_y += (newy-_y)/5;
}

```

}

on (rollOver) {  
\_root.px = true;  
}

on (rollOut) {  
\_root.px = false  
}  
[/AS]

OniHime 🙂
