Snow Applet


This tutorial is on the
" Snowflakes Applet "
 
This applet is very much like the snow applet, except it has larger flakes.  It has one unique aspect that I think you will enjoy,  the snowflakes will follow the mouse pointer as you move it over the image.  You can use any type of graphic.  There need not be snow present on the graphic for this applet to work.  You will have little or no preparation to do.  You will need the the SnowFlakes.class file and the SnowFlakes.jar files which you can download  from the files area on the Yahoo Group Page. 
 
Step #1
 
Choose your graphic, you will need the image dimensions for the applet code.  Frames can be used, however they are not necessary.  Remember that the snow will fall over the framework unless you add it as another layer.  I prefer to create my frame using borders in the style, or backgrounds in a table.  Size it how you want it, save and upload both the class file and the image file to your website. 
 
Step #2
 
Once all of your files are uploaded you are ready to add your applet to your script.  You can use just about any script, pasting the applet code in over the image tag.  You can also find some scripts at the files section, ready to use.  Here is the sniplet code i use.  The changes you need to make are in red.  You will be using the height and width here of the image.  There is nothing to allow for water, since there isn't any.....
That is another applet !
 
For webpage use :
 
<CENTER><APPLET SnowFlakes.class width=288 height=355 mayscript archive="SnowFlakes.jar"><PARAM NAME="constant" VALUE="on"><PARAM NAME="flakenumber" VALUE="50"><PARAM NAME="applethomepage" VALUE="http://go.to/javabase"><PARAM NAME="speed" VALUE="1"><PARAM NAME="delay" VALUE="30"><PARAM NAME="color" VALUE="FFFFFF"><PARAM NAME="background" VALUE="applets/image name.jpg">
                    <!param name="tile" value="on">  <!param name="transparent"
                  value="on">             
            </APPLET></CENTER>
 
For stationery use :
 
** Notice the difference between the two
applets.  You must use the codebase= in your applet tag for the stationery applet to work.
 
<CENTER><APPLET codebase=" http://www.your website addy/ "  SnowFlakes.class width=288 height=355 mayscript archive="SnowFlakes.jar"><PARAM NAME="constant" VALUE="on"><PARAM NAME="flakenumber" VALUE="50"><PARAM NAME="applethomepage" VALUE="http://go.to/javabase"><PARAM NAME="speed" VALUE="1"><PARAM NAME="delay" VALUE="30"><PARAM NAME="color" VALUE="FFFFFF"><PARAM NAME="background" VALUE="http://your website addy/image name.jpg">
                    <!param name="tile" value="on">  <!param name="transparent"
                  value="on">             
            </APPLET></CENTER>
 
That's all there is to it.....
If you are using one of my scripts,
one with a div container, simply add about 5px to the height and width of your image as the div's height and width for the borders.
 
I hope that you will enjoy making the "Snow Applet".  I think it is by far one of the easiest ones to put together and a wonderful effect.  If you have any questions or problems, don't hesitate to ask Karen or Shari......or anyone in the group.  We are all helping each other to learn here.
 
Hugs,
 
Karen
 
Thanks NormaJean, once again for the wonderful piano music, you play beautifully ! 

Copyright İFebruary, 2002 - All Rights Reserved.