Fall v1.7a

Fall is a small script to allow you to have falling objects on your web page.  A seasonal idea would be of course, Snow!!!

Setting it up is easy:

  1. Download this file (right click, save as) (fall.zip)
  2. In the zip file you will find: fall.js , snowflake.gif , snowflake2.gif, snowflake3.gif
  3. Put this line within the <body> tags on your page:
    <script language="JavaScript" src="http://yourdomain.com/fall.js"></script>

That should be it...

If you want to change the variables in Fall they are as follows:

  • no=13 -> number of objects
  • speed=30 -> delay speed (milliseconds)
  • slider=30 -> how far to waft side to side (pixels)
  • fallmax=8 -> maximum fall speed (pixels)
  • wind=0 -> prevailing wind (1=right, -1=left, 0=off)

In this version, the images are set up as follows:

  • fallg[x]=new Array("filename.gif",width,height,3d)

where 3d is 1=on or 0=off,  e.g.:

  • fallg[1]=new Array("snowflake.gif",25,28,1)

when adding multiple images you must make sure that the x is replaced with the next number in the sequence, with the sequence starting with 0.

Toggle Fall
A few e-mails arrived asking for a toggle switch for fall to turn it off and on (Fall can be processor intensive for low spec machines) This is the addition to 1.7a. The toggle can be made from a link on any object/text to the toggle function:

<a href="JavaScript:togFall();">Toggle Fall</a>

Thanks to Kage for the idea for the toggle.  Check out his site here (http://ss.dbmxl.com)