View Full Version : Changing Speed of Falling Objects

08-26-2006, 07:48 AM
I don't see where I can change the speed of the objects (leaves) falling in this code. Can someone point it out to me?

Click on this link and view source to see what I'm talking about:


name _F1
08-26-2006, 07:56 AM
Speed[i]= Math.random()*5+3;
At the moment, the speed is a random number between 0 and 1, multiplied by 5, and then the result is increased by 3.

I'd suggest changing the +3 if you wish to make them overall faster/slower, increase the multiplier to increase the range of speeds, decrease to decrease, etc.

08-28-2006, 06:36 AM
Thank you. It worked. I actually already tried that, only I didn't see that there were two places I needed to change that particular number.

Thanks again.