PDA

View Full Version : Number of Flakes in "SnowEffect"



NancyRoses
10-21-2008, 06:42 PM
SnowEffect

http://www.dynamicdrive.com/dynamicindex3/snow.htm

WHERE is the place in the code to change the number of flakes?

I simply can't find it!!

I tried to change the only places I see the number 10, but that seems to vary other things...:confused:

Also, although I copied the code with cut and paste, my flakes do not "renew" after the first fall...

jscheuer1
10-21-2008, 06:49 PM
<script type="text/javascript">

/******************************************
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use
******************************************/

//Configure below to change URL path to the snow image
var snowsrc="snow.gif"
// Configure below to change number of snow to render
var no = 10;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";

///////////Stop Config//////////////////////////////////

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getEleme . . .

Just change the highlighted 10, and only the highlighted 10 to however many flakes you want.

NancyRoses
10-21-2008, 09:32 PM
ok...feeling dumb here... I thought that entire section was directions, and that the changes had to happen further down....

In fact... further down I put my snow url in a snowsrc line.... it seemsed to work... was that wrong? Is that why I don't get repeats?

Nancy

jscheuer1
10-21-2008, 11:53 PM
Yes, you misunderstood (but you won't be the first or last who has). Here color coded:


<script type="text/javascript">

/******************************************
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use
******************************************/

//Configure below to change URL path to the snow image
var snowsrc="snow.gif"
// Configure below to change number of snow to render
var no = 10;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";

///////////Stop Config//////////////////////////////////

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getEleme . . .

Everything green is a comment and/or instructions. All Highlighted are values that you can change. The rest is code that should not be changed unless you really know your stuff. Red and beyond shouldn't even be looked at in most cases.

You can do whatever you like with the script of course, as long as the credit remains. You can often learn things by looking at and/or playing with the rest of the code, but - for normal use - the above rules should be followed.

NancyRoses
10-22-2008, 04:22 PM
But below the red, there is another place where it says, "snow.gif" If I don't change that, the correct image does not show.

jscheuer1
10-22-2008, 06:13 PM
The line you mean is (or at least is in the script if unaltered):


snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc


If it remains like that, the snowsrc will be whatever you set in the configuration area, unless you try to hotlink a dynamic drive hosted image. You should use your own snow image. You can download the one from Dynamic Drive, please just don't hotlink to it.