k8donline
Nov 16 2004, 02:37 PM
A snow storm: after <BODY> or <HEAD>
QUOTE <body bgcolor=#000000 onLoad=\"snow()\">
<script language=\"JavaScript\">
<!-- N = 40; Y = new Array();
X = new Array();
S = new Array();
A = new Array();
B = new Array();
M = new Array();
V = (document.layers)?1:0;
iH=(document.layers)?window.innerHeight:window.document.body.clientHeight;
iW=(document.layers)?window.innerWidth:window.document.body.clientWidth;
for (i=0; i < N; i++){
Y[i]=Math.round(Math.random()*iH);
X[i]=Math.round(Math.random()*iW);
S[i]=Math.round(Math.random()*5+2);
A[i]=0;
B[i]=Math.random()*0.1+0.1;
M[i]=Math.round(Math.random()*1+1);
}
if (V){
for (i = 0; i < N; i++)
{document.write(\"<LAYER NAME='sn\"+i+\"' LEFT=0 TOP=0 BGCOLOR='#FFFFF0' CLIP='0,0,\"+M[i]+\",\"+M[i]+\"'></LAYER>\")}
}
else{
document.write('<div style=\"position:absolute;top:0px;left:0px\">');
document.write('<div style=\"position:relative\">');
for (i = 0; i < N; i++)
{document.write('<div id=\"si\" style=\"position:absolute;top:0;left:0;width:'+M[i]+';height:'+M[i]+';background:#fffff0;font-size:'+M[i]+'\"></div>')}
document.write('</div></div>');
}
function snow(){
var H=(document.layers)?window.innerHeight:window.document.body.clientHeight;
var W=(document.layers)?window.innerWidth:window.document.body.clientWidth;
var T=(document.layers)?window.pageYOffset:document.body.scrollTop;
var L=(document.layers)?window.pageXOffset:document.body.scrollLeft;
for (i=0; i < N; i++){
sy=S[i]*Math.sin(90*Math.PI/180);
sx=S[i]*Math.cos(A[i]);
Y[i]+=sy;
X[i]+=sx; if (Y[i] > H){
Y[i]=-10;
X[i]=Math.round(Math.random()*W);
M[i]=Math.round(Math.random()*1+1);
S[i]=Math.round(Math.random()*5+2);
}
if (V){document.layers['sn'+i].left=X[i];document.layers['sn'+i].top=Y[i]+T}
else{si[i].style.pixelLeft=X[i];si[i].style.pixelTop=Y[i]+T} A[i]+=B[i];
}
setTimeout('snow()',10);
}
//-->
</script>
Comment/Reply (w/o sign-up)
hellomyfriends
Jan 2 2005, 01:19 PM
Hey man,it's so cool, i need it for my Xmas site.lol
Comment/Reply (w/o sign-up)
Minisheep
Jan 5 2005, 11:27 AM
Wonderful.Maybe you can use some images instead of the white block.
Comment/Reply (w/o sign-up)
k8donline
Jan 7 2005, 06:32 AM
nice idea!but the website will be slow down.
Comment/Reply (w/o sign-up)
hellomyfriends
Jan 17 2005, 05:24 AM
yes,your site will be slowed down
Comment/Reply (w/o sign-up)
clffworld
Jan 19 2005, 01:53 AM
I think the site will be slow down too.
But its cool!
Comment/Reply (w/o sign-up)
andrej
Jan 19 2005, 09:43 AM
I copyed this in dreamweaver 2004 after <head> and it is not working. :roll: :|
:shock: can somebody tell me more specificly? :roll:
Comment/Reply (w/o sign-up)
God
Jan 19 2005, 02:13 PM
Did you put this in your body tag: CODE onload="javascript: snow()"
Comment/Reply (w/o sign-up)
andrej
Jan 22 2005, 06:36 PM
criminalid
Feb 15 2005, 02:11 PM
Yeah,
I already used this code one time... Its so pretty cool
For X-Mas Site so.... hehehe
Comment/Reply (w/o sign-up)
Ruben
Dec 13 2008, 09:32 PM
I thought it was great, but as everyone said, and I thought would happen, it slowed down my site too much. Great idea though. I'm sure it will come handy to those with high powered servers.
Comment/Reply (w/o sign-up)
Echo_of_thunder
Dec 13 2008, 07:03 PM
QUOTE (Minisheep @ Jan 5 2005, 07:27 AM)  Wonderful.Maybe you can use some images instead of the white block. QUOTE (k8donline @ Jan 7 2005, 02:32 AM)  nice idea!but the website will be slow down. yes some snow flake images would look a lot better for this script, but as said it will slow down the site. I have used the same script myself, and every time I would always get someone telling me. remove it, it freeze up my system or makes it too slow.
Comment/Reply (w/o sign-up)
ninja-b
Feb 23 2005, 07:37 PM
tnx for the script its is good i chaked it
Comment/Reply (w/o sign-up)
Recent Queries:--
storm javascript code - 8.59 hr back. (1)
-
snow storm javascript - 15.29 hr back. (1)
-
my snow effect javascript is not working - 166.68 hr back. (1)
-
javascript snow html - 171.99 hr back. (1)
-
javascript snow - 193.91 hr back. (1)
-
round snow small image javascript - 212.27 hr back. (1)
-
snow javascript html - 223.11 hr back. (2)
-
snowstorm javascript - 80.16 hr back. (3)
-
snowstorm effect in javascript - 231.32 hr back. (1)
-
javascript snow storm - 266.60 hr back. (1)
-
javascript snowstorm - 290.69 hr back. (2)
-
javascript for snow in a cell - 291.15 hr back. (1)
-
snowfall javascript code - 300.02 hr back. (1)
Similar Topics
Keywords : javascript, snow, storm
- Storm Chaser
A New Season (2)
Brain Storm
some new ideas for topics (6) I’ve been too busy lately but whenever I go to these forums I feel it’s too difficult to find topics
I’m interested in. So I thought I would brain storm some new ideas for topics. 1) I’ve been
watching Prison Break on TV, any one else feel like talking about this show? 2) I pirate a lot of
software. Now I will respect the rules of this forum, and I won’t tell anyone where or how I do it
but I don’t think it’s wrong. I think software is too expensive and I should not have to pay for
software that has questionable functionality. Any thoughts? 3) I have acne, I use....
Iframe External Link (Javascript)
(0) This code will allow people who use iframes to link to there page, then load the iframe so that they
can give external links to people that will link directly to the iframe page they want to see.
now this first part has to be in the head of your document
CODE window.onload = function
setIframe() { var url = window.location.href; var i = url.indexOf("?i="); if( i>-1 ) {
url = url.substr(i+3); document.getElementById("body").src = url; } }
now this is
about how your iframe tag should look
CODE
of course replace th....
Javascript/HTML form submissions On a Mac
(1) My hope is that someone out there can help me with this problem. I have some javascript that will go
thru (on a PC that is) a HTML page looking for a specifc word submitted via an onclick function.
Orginally it was a form submission with an onsubmit that ran the function. But in trying to
trouble shoot it I thought the mac was submitting the form differently than the PC versions (maybe
the DOM) so I created a button with an onclick command. Again it works for the PC but not for the
MAC.
I am at my wits end. If someone can help; below is the code I am using. I....
Javascript loading iframes
(1) Im getting this message
CODE Line: 14 Char: 3 Error: 'document.getElementByID(...)' is null
or not an object Code: 0 URL: http://www.stoneddevilinc.com?i=full_site_part_1.html
when i
try to run this code
CODE function setIframe() { var url = window.location.href;
var i = url.indexOf("?i="); if( i>-1 ) { url = url.substr(i+3);
document.getElementById("content").src = url; } } window.onload = setIframe();
with this url
CODE http://www.stoneddevilinc.com/?i=full_site_part_1.html
to pull up
this ifra....
JavaScript PHP redirecting
(2) Hi there! /biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' />
Is
there a way to use JS to change a form's submit target based on which submit button was pressed?
Eg.
CODE Register Login
Thank you!!
Added code tags--CodeFX ....
javascript
(3) some nice javascript to add in your site CODE cell bg changer .tditem { font-size:
12px; font-family: Verdana, Arial, Helvetica, sans-serif; text-decoration: none; color: gray; }
Item 1 | Item 2 | Item 3
....
A GREAT JAVASCRIPT COLLECTION
(1) Best program containing many Java scripts AA Scripter. Can be downloaded from this link
http://www.cyberiapc.com/aa/aascripter.htm
**Changed all caps to correct case. --CodeFX ....
Excellent site for Javascript Tools
(1) This is the best source for Javascript tools.
http://www.codebrain.com/
**Removed all caps
--CodeFX ....
Browser Redirection Javascript code.
(1) Hi does anyone have a browser direction code( so if someone went to my site with IE it would forward
to a site telling you to download Firefox).
If so could you email it to me : daniel dot maxson at
gmail dot com
Thanks
Daniel....
Kickoff Frame Javascript
(1) Hi I have this javascript
------------------------------
CODE if
(parent.frames.length==0) parent.location.href="Redirect to?" -->
------------------------------
Is this the right one for kicking off frames?
Dani
**Code
tags added**--CodeFX ....
[JavaScript] Check for Flash
(0) This script i have modified. With this script you can check if Flash is installed.
CODE
var flashinstalled = 0; var flashversion = 0; MSDetect = "false"; if
(navigator.plugins && navigator.plugins.length) { x = navigator.plugins ; if (x)
{ flashinstalled = 2; if (x.description) { y =
x.description; flashversion = y.charAt(y.indexOf('.')-1); } }
else flashinstalled = 1; if (navigator.plugins ) { flashinsta....
Javascript? I Need a random picture thingy>>>
(6) I need a script or something so that every time a page is loaded, there is a different picture
shown...? and so I can like put a list of URL's and it goes through them randomly or just has an
order.......
I really need a java script special effect like snow storm.
(4) I would like some special on my site. If you know the code for making a snow storm please respond.
I would really thank you.....
internet security problems, can't open javascript!
(1) Help me out please. I was trying to use a new anti virus program, Kaspersky. After I used it for one
full scan my computer has gone totally mad! On the internet I cant open half the links, anything
with javascript. on the bottom of my browser it just starts complaining... Even worse is the fact
that I can't open my Windows Mediapplayer since the scan. It just says: 'internal application
error'. I tried everything; uninstall, reinstall, I can use the mplayer2, but I'm used to the luxury
of WMP10. Please help me out guys. My room is too quiet without my music........
Javascript sites
(9) Here are some sites for your javascript needs:
http://www.dynamicdrive.com/
http://www.javascript-2.com/
http://javascript.internet.com/
http://javascriptkit.com/script/cut57.shtml
http://www.webreference.com/js/
http://www.codehouse.com/
http://www.freewarejava.com/
http://a1javascripts.com/
http://hotscript.com/
To Learn javascript:
http://www.javascriptmall.com/learn/contents.htm
http://www.w3schools.com/js/default.asp
Good luck!....
Baltic Storm
Most Baltic countries were affected (0) There was a storm over the Baltic countries and parts of Scandinavia the 9th and 10th. A third of
Estonia was without power. Pärnu was partially flooded. The water level was 3 metres higher than
usual near the beach area (probably will have the worst water-damage). Here's some pictures of
the damage made by the storm in Pärnu and the rescue operation. ....
Looking for javascript, snow, storm
|
Searching Video's for javascript, snow, storm
|
advertisement
|
|