js: snow code

Forum for anything hard- or software related.

Moderator: Moderators

Post Reply
Hirchart
blew itself up
Posts: 361
Joined: Wed Aug 13, 2003 6:42 am
In-game Name: Hirchart
Location: Nijmegen, Netherlands
Location: NL

js: snow code

Post by Hirchart »

I like this snow alot, and my band site is so boring, so can anyone tell me what the code is for this cuddley snow on my screen ?:)
Your favorite asshole in AQ2 since '99
Den
something dur dur
Posts: 2616
Joined: Fri Jul 25, 2003 8:56 am
Location: nl
Contact:

Post by Den »

Code: Select all

<style> 

.drop { position: absolute; width: 3;  filter: flipV(), flipH(); font-size: 8; color: blue } 

</style>

<script language="javascript"> 

snow = true;    // false-rain;   true-snow 

snowsym = " * "  //These are the symbols for each 

rainsym = " ' "  //You can put images here. 

howmany = 10     //How many drops/snowflakes? 



/**************Do not need to change anything below***********/ 

if(snow){sym = snowsym; speed=1; angle=10; drops=howmany} 

else{sym = rainsym; speed=10; drops=howmany; angle=6} 

movex = -speed/angle; movey = speed; count = 0; 



function moverain(){ 

for(move = 0; move < drops; move++){ 

xx[move]+=movex;  yy[move]+=mv[move]; 

hmm = Math.round(Math.random()*1); 

if(xx[move] < 0){xx[move] = maxx+10;} 

if(yy[move] > maxy){yy[move] = 10;} 

drop[move].left = xx[move] 

drop[move].top = yy[move]+document.body.scrollTop; 

}setTimeout('moverain()','1')} 



</script>

<script language="JavaScript1.2">



function high(which2){

theobject=which2

highlighting=setInterval("highlightit(theobject)",50)

}

function low(which2){

clearInterval(highlighting)

which2.filters.alpha.opacity=20

}







function highlightit(cur2){

if (cur2.filters.alpha.opacity<100)

cur2.filters.alpha.opacity+=5

else if (window.highlighting)

clearInterval(highlighting)

}



</script>
There's a chopper coming in 3 days and there's a katana on top of the cafe and that's all you need to know
Image
Hirchart
blew itself up
Posts: 361
Joined: Wed Aug 13, 2003 6:42 am
In-game Name: Hirchart
Location: Nijmegen, Netherlands
Location: NL

Post by Hirchart »

tnx :)
Your favorite asshole in AQ2 since '99
Post Reply