Sign in to follow this  
flounder

looping javascript functions

Recommended Posts

(i'm not sure what forum this should go in) i'm trying to make a mouse follower using javascript. I have a box that follows the mouse just fine, but it only calls the function to move the box when the mouse moves. I need to know how to call that function continuously. Anyone know?

Share this post


Link to post
Share on other sites
You will need to use one of the 2 timeout functions to call it every so often. setTimeout is one of the 2 functions, but I can't remember the other. Remember you're sharing the processing time with the browser, so you can't truly do anything continuously in a browser's javascript functions.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this