PDA

View Full Version : easing and original position ~_~



OniHime
June 3rd, 2003, 02:06 AM
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

OniHime
June 3rd, 2003, 04:38 AM
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

pom
June 3rd, 2003, 08:24 AM
All you have to do is make the clip ease to aposition that you've stored somewhere, no?

pom :phil:

OniHime
June 3rd, 2003, 12:00 PM
:*(

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

Thanks

OniHime

OniHime
June 3rd, 2003, 12:18 PM
lol... well.. posting a reply to ilyaslamasse made my script work XD

Thanks ilyaslamasse ^^ i think i got ur hint... here's the 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
}


OniHime :)

felipegm
March 3rd, 2004, 07:51 AM
Hi,

I´m really new in AS and this is what I´m looking for.
What are the codes u used on the buttons and on the MC?

Thx