To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-22-2007, 10:44 AM   #1
kongoroy
Junior Member
 
Join Date: Feb 2005
Posts: 21
[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
}
}
kongoroy is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:38 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.