How can i make a mouse follower like the one on this site http://www.h69.net ? I can make the thing follow the mouse but how to make it springy :S
Thanks in advance :D
Esherbet
Printable View
How can i make a mouse follower like the one on this site http://www.h69.net ? I can make the thing follow the mouse but how to make it springy :S
Thanks in advance :D
Esherbet
inertia...
actionscripted mouse follow action... do a search here at flashkit or
http://www.kirupa.com/developer/actionscript/spring.asp
m
Thanks!
Place this scripts inside the object to follow the mouse.
Basically the distance between the mouse and the object
is diminished.
frame 1:
physics0 = 0.25;
physics1 = 0.5;
frame 2:
// nothing in here
frame 3:
xspeed = ((_root._xmouse-_x)*physics0)+(xspeed*physics1);
yspeed = ((_root._ymouse-_y)*physics0)+(yspeed*physics1);
// add the speed to the current position of the object
_x += xspeed;
_y += yspeed;
Thanks alot for your help , is appreciated :D
Esherbet