|
-
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 
Esherbet
-
the word you want is...
inertia...
actionscripted mouse follow action... do a search here at flashkit or
http://www.kirupa.com/developer/actionscript/spring.asp
m
-
-
put this code...
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
Thanks alot for your help , is appreciated 
Esherbet
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|