Easing and original position ~_~

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

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

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

pom :phil:

:*(

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

Thanks

OniHime

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 < 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 :slight_smile: