FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Snow fall on website





mustaq
Hi guys

i want to make snow fall on my website for xmas can you people tel me the code to make snow fall on the website
mathiaus
I'd use this one myself. you can get others but they can somethimes be over powing and quite large and some of their code is massive. This ones nice though Very Happy
http://www.btinternet.com/~kurt.grigg/javascript/snow/snow.html
WaCk0
i think snow effects are annoying when looking at a site..

dont use it on all pages Razz
misterdimiz
WaCk0 wrote:
i think snow effects are annoying when looking at a site..

dont use it on all pages Razz


... agreed. Wink
And if you can, don't use so much javascripts in pages.
carriage_return
Having read the response to this topic given by the last couple of authors, I would like to add something regarding the same point of view (about using the snow effect in sites, powered by javascript).

First of all, don't worry, I'm not here to beat you down for thinking about it or tell you that you are somehow not allowed to do so, only to make a few comments. Second, I think those comments are in order, the purpose of every publication (for example a web site) is to be viewed, to satisfy the needs of the audience (which in many cases can be yourself, if you just make a site for you). Now, falling snow does look good, or rather can look good. But, and I think most people will agree with me on this, it can kill a site when used all over the screen and in every page of the site.

Now, I don't know exactly how javascript works, but maybe you can take heed of this advice and use it as you see fit. What about designating special places, sections, of your site and make snow fall in those spaces. You can have colums at the sides of the content, your banner, the footer ... there are tons of posibilities if the scripting language permits it. But bear in mind a couple of things:

1) Treat the fx as back story. Remember the most important part of your site is the content, and you don't want people to be prevented to access your content. Falling snow floating in front of the content is a barrier that the user will have to fight off to access what they have been looking for. So, keep the snow restricted, and keep it off your content.

2) Avoid the boxed snow effect. If you use a sinle column layout (with the column centered) and both a header and footer, please remember not to use the effect on every one of those places. Specially the problem is in using it in the header and the footer. This kind of "shorcut" falling snow is terrible and looks quite surreal; the thing is you're breaking the natural pattern of falling snow with your content (at least you're not putting it over your content though) and not only that, but you continue it in the footer, creating a less than believable image. This is worse if you put the falling snow in the sides at the same time (I think just putting the falling snow in the sides of the main column would look great, or at least neat enough), creating some kind of boxed blizard where your content is supposed to be floating, this (I've experienced) is hard on the eyes, and plain (for me) annoying.

3) Keep the dizzy factor low. Make the snowflakes medium sized, and let the snow fall ... slowly. There is nothing more headache inducing than a rapidly moving tiny background while you are trying to read something or contentrate.

This are just a couple of tips, and completely my opinion. I wish you luck with the snowy site.

carriage_return
Alie
As for me - the best place for this script is the header of the page. It's not confusing eyes and look pretty nice Wink
charliehk
I think it could also be done using Flash. I have seen some websites offering free Flash clips for snow.
SamiTheBerber
Nice snow. Maybe I would try to make one my own, when I'm more skilled Razz

Maybe I should try that :S
srikanthsonti
nice post thx for the snow Very Happy Very Happy
niranvv
Hai
please have a look at my site:

www.niran.frih.net

Its not snows, but its snow effect!
u can change it to snow effect by change the image link: images/snow_effect.gif
Im copying the code here.
Insert the code in your page between: <body> and </body> tags:

Quote:

<script language="javascript" type="text/javascript">
var snowsrc="images/snow_effect.gif" ;
var no = 10;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 700;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0;
xp[i] = Math.random()*(doc_width-50);
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
if (ns4up) {
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></layer>");
}
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></div>");
}
}
}
function snowNS() {
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];
document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowNS()", 10);
}
function snowIE() {
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];
document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}
setTimeout("snowIE()", 20);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
</script>



Thank you,

Niran
www.niran.frih.net

mustaq wrote:
Hi guys

i want to make snow fall on my website for xmas can you people tel me the code to make snow fall on the website


Razz
lucifertje
it is a javascript.
But why do you want to do that? It slows down everything. You have to keep in mind that that's again more script. It's like making javascript transitions between pages.

please don't do that people
Related topics
Please Give Feedback About My Funny Pics Collection!
myspace code problems
my site
First snow of the season
Snow fall script
High School Social Studies Class Website
Natural Disasters
should we care about antartic ice melting?
What can you see out of your window when you're posting?
Holiday mode or "summer break"
Natural disasters everywhere!
Cognitive Science and possible collective thinking
Getting Ready for the Move
Frihost, I'm soooo disappointed at you.
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.