View Full Version : Snow Script Question

Scott Ludtke
01-18-2013, 12:52 AM
1) Script Title: Snow Effect

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex3/snow.htm

3) Describe problem: I would like to have multiple sized snow flakes falling. How do I tweak the code to include multiple images?

Thank you VERY much :-)

01-18-2013, 04:03 AM
Use this script:


substituting various snowflake images for the various leaf ones. Better yet, use this updated version:


Use your browser's "View Source" to get the code.

I know, the images are all the same and they're going up. However, you can configure multiple images and/or change the direction in this section:

var dir=-1 // Set 'falling' direction (1 for down, -1 for up)
var speed=60 // 12 to whatever (60 is pretty slow) higher numbers are slower
var Amount=8; // Smoothness depends on image file size, the smaller the size the more you can use!
var sway=10 // Set amount of left/right swaying of objects (default=10), higher numbers produce more sway

//Pre-load your image(s) below!
grphcs=new Array(6)
Image0=new Image();
Image1=new Image();
Image2=new Image();
Image3=new Image();
Image4=new Image();
Image5=new Image();

Scott Ludtke
01-18-2013, 10:28 AM
Thank you John.

Okay. I tried the script and I cannot seem to get it to work. I have it on a demo site here: waukeshaguitartownproject.com and I am using musical notes in place of the leaves.
Help or suggestions would be sincerely appreciated.

Have a great day!

Scott Ludtke
01-18-2013, 11:08 AM

Please disregard my inability to get it working. I simply had to move the code to the proper area in header.php to bring the script forward.

Thank you VERY much!

Have a great day!