Προς το περιεχόμενο

Help me!


Daner

Προτεινόμενες αναρτήσεις

Δημοσ.

Meta apo ena View Source sto <A HREF="http://www.eviainfo.gr" TARGET=_blank>www.eviainfo.gr</A> o kwdikas einai:<BR><BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre> <BR><SCRIPT language=JavaScript1.2><P><BR> <P> //Configure below to change URL path to the snow image<BR> var snowsrc="snow1.gif"<BR> // Configure below to change number of snow to render<BR> var no = 10;<P> var ns4up = (document.layers) ? 1 : 0; // browser sniffer<BR> var ie4up = (document.all) ? 1 : 0;<P> var dx, xp, yp; // coordinate and position variables<BR> var am, stx, sty; // amplitude and step variables<BR> var i, doc_width = 800, doc_height = 600;<BR> <BR> if (ns4up) {<BR> doc_width = self.innerWidth;<BR> doc_height = self.innerHeight;<BR> } else if (ie4up) {<BR> doc_width = document.body.clientWidth;<BR> doc_height = document.body.clientHeight;<BR> }<P> dx = new Array();<BR> xp = new Array();<BR> yp = new Array();<BR> am = new Array();<BR> stx = new Array();<BR> sty = new Array();<BR> <BR> for (i = 0; i < no; ++ i) { <BR> dx = 0; // set coordinate variables<BR> xp = Math.random()*(doc_width-50); // set position variables<BR> yp = Math.random()*doc_height;<BR> am = Math.random()*20; // set amplitude variables<BR> stx = 0.02 + Math.random()/10; // set step variables<BR> sty = 0.7 + Math.random(); // set step variables<BR> if (ns4up) { // set layers<BR> if (i == 0) {<BR> document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show1\"><a href=\"http://dynamicdrive.com/\"><img src='"+snowsrc+"' border=\"0\"></a></layer>");<BR> } else {<BR> document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show1\"><img src='"+snowsrc+"' border=\"0\"></layer>");<BR> }<BR> } else if (ie4up) {<BR> if (i == 0) {<BR> document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='"+snowsrc+"' border=\"0\"></a></div>");<BR> } else {<BR> document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"></div>");<BR> }<BR> }<BR> }<BR> <BR> function snowNS() { // Netscape main animation function<BR> for (i = 0; i < no; ++ i) { // iterate for every dot<BR> yp += sty;<BR> if (yp > doc_height-50) {<BR> xp = Math.random()*(doc_width-am-30);<BR> yp = 0;<BR> stx = 0.02 + Math.random()/10;<BR> sty = 0.7 + Math.random();<BR> doc_width = self.innerWidth;<BR> doc_height = self.innerHeight;<BR> }<BR> dx += stx;<BR> document.layers["dot"+i].top = yp;<BR> document.layers["dot"+i].left = xp + am*Math.sin(dx);<BR> }<BR> setTimeout("snowNS()", 10);<BR> }<P> function snowIE() { // IE main animation function<BR> for (i = 0; i < no; ++ i) { // iterate for every dot<BR> yp += sty;<BR> if (yp > doc_height-50) {<BR> xp = Math.random()*(doc_width-am-30);<BR> yp = 0;<BR> stx = 0.02 + Math.random()/10;<BR> sty = 0.7 + Math.random();<BR> doc_width = document.body.clientWidth;<BR> doc_height = document.body.clientHeight;<BR> }<BR> dx += stx;<BR> document.all["dot"+i].style.pixelTop = yp;<BR> document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);<BR> }<BR> setTimeout("snowIE()", 10);<BR> }<P> if (ns4up) {<BR> snowNS();<BR> } else if (ie4up) {<BR> snowIE();<BR> }<P></SCRIPT><BR></pre><HR></BLOCKQUOTE><P>Elpizw na doulevei...<P>Filika<BR>Dionisos

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...