|
-
[F8] Trying to make an MC follow the mouse with time delay
Hi there,
I am trying to make a movieclip (called butterfly) follow the mouse on the stage but I don't want the butterfly to move instantly. Ideally I want the movement to be 'softer' with a time delay so that the butterfly takes a bit of time to catch up with the mouse.
I have tried setting the ease and speed but that doesn't seem to give the desired effect. (there's an example of a butterfly tracking the mouse here: http://www.pachalondon.com/home.htm)
Has anyone managed to find a tutorial on this or make it themselves or know which direction I should be heading in? (code (AS2) I have made so far is below)
Thanks!!
followme=true
var speed=10
onEnterFrame=function(){
if(followme==true){
butterfly._x=_xmouse/speed;
butterfly._y=_ymouse/speed;
}else{
butterfly._x=xpos
butterfly._y=ypos
}
}
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
|