Click to See Complete Forum and Search --> : Another newbie needing help!!


Jscript student
04-28-2003, 08:36 PM
I'm a student and have a JScript exercise due really soon.
I need a script that randomly (math.random)moves an image around the screen with the ability to stop it with a onMouseover or OnClick event. I can find lots of random images, but am stuck on how to create a pause. I know I need to reset the interval to 0 when onMouseover is true, but can't find a script to deconstruct for this assignment.
Anybody got or know of one??

Thanks

pyro
04-28-2003, 10:45 PM
Since this is for an assignment, don't you think it would be better if you tried to do it yourself, rather than ask for a script? Why don't you post the code you have so far, and I'm sure we will be able to help point you in the right direction from there.

DrDaMour
04-29-2003, 03:14 AM
say your movment function is move()

well at the end of move you should have



if(WantToKeepMoving?){
setTimeout(move(),"timeInMiliseconds");
}