31 Mensajes
12
Adm.Flamenco
Come y duerme en el foro
Come y duerme en el foro

Hola.
Se puede poner en el foro el efecto de nieve callendo?
Navidad

Saludos

Avatar Image
Colega ;)
Colega ;)

Solo hay que cambiar URL (en: var snowflake = "URL";) por la url de la imagen que hara de copo de nieve

Codigo PHP:

<script>


var no = 15; // snow number
var speed = 15; // smaller number moves the snow faster
var snowflake = "URL";

var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 400, doc_height = 500;
if (ns4up) {
  doc_width = self.innerWidth;
  doc_height = self.innerHeight;
} else if (ie4up) {
  doc_width = 500;
  doc_height = 500;
}
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 = 0;                        // set coordinate variables
  xp = Math.random()*(doc_width-50);  // set position variables
  yp = Math.random()*doc_height;
  am = Math.random()*20;         // set amplitude variables
  stx = 0.02 + Math.random()/10; // set step variables
  sty = 0.7 + Math.random();     // set step variables
  if (ns4up) {                      // set layers
    if (i == 0) {
      document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
      document.write("top=\"15\" visibility=\"show\"><img src=\"");
      document.write(snowflake + "\" border=\"0\"></layer>");
    } else {
      document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
      document.write("top=\"15\" visibility=\"show\"><img src=\"");
      document.write(snowflake + "\" border=\"0\"></layer>");
    }
  } else if (ie4up) {
    if (i == 0) {
      document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
      document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
      document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
      document.write(snowflake + "\" border=\"0\"></div>");
    } else {
      document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
      document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
      document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
      document.write(snowflake + "\" border=\"0\"></div>");
    }
  }
}
function snowNS() {  // Netscape main animation function
  for (i = 0; i < no; ++ i) {  // iterate for every dot
    yp += sty;
    if (yp > doc_height-50) {
      xp = Math.random()*(doc_width-am-30);
      yp = 0;
      stx = 0.02 + Math.random()/10;
      sty = 0.7 + Math.random();
      doc_width = self.innerWidth;
      doc_height = self.innerHeight;
    }
    dx += stx;
    document.layers["dot"+i].top = yp;
    document.layers["dot"+i].left = xp + am*Math.sin(dx);
  }
  setTimeout("snowNS()", speed);
}

function snowIE() {  // IE main animation function
  for (i = 0; i < no; ++ i) {  // iterate for every dot
    yp += sty;
    if (yp > doc_height-50) {
      xp = Math.random()*(doc_width-am-30);
      yp = 0;
      stx = 0.02 + Math.random()/10;
      sty = 0.7 + Math.random();
      doc_width = document.body.clientWidth;
      doc_height = document.body.clientHeight;
    }
    dx += stx;
    document.all["dot"+i].style.pixelTop = yp;
    document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
  }
  setTimeout("snowIE()", speed);
}

if (ns4up) {
  snowNS();
} else if (ie4up) {
  snowIE();
}
</script>

kcuca
Machacateclados
Machacateclados

Yekipe,me dices la url de la nieve?, effec donde copio y pego ese codigo???

Saludos

Adm.Flamenco
Come y duerme en el foro
Come y duerme en el foro

Pues nose, ami no me sale nada.
He puesto el codigo en html cabecera con la url del copo de nieve y no sale nada.

He puesto esto.

Codigo PHP:

<script>


var no = 15; // snow number
var speed = 15; // smaller number moves the snow faster
var snowflake = "http://www.altan.hr/snow/dot.gif";

var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 400, doc_height = 500;
if (ns4up) {
  doc_width = self.innerWidth;
  doc_height = self.innerHeight;
} else if (ie4up) {
  doc_width = 500;
  doc_height = 500;
}
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 = 0;                        // set coordinate variables
  xp = Math.random()*(doc_width-50);  // set position variables
  yp = Math.random()*doc_height;
  am = Math.random()*20;         // set amplitude variables
  stx = 0.02 + Math.random()/10; // set step variables
  sty = 0.7 + Math.random();     // set step variables
  if (ns4up) {                      // set layers
    if (i == 0) {
      document.write("<layer name="dot"+ i +"" left="15" ");
      document.write("top="15" visibility="show"><img src="");
      document.write(snowflake + "" border="0"></layer>");
    } else {
      document.write("<layer name="dot"+ i +"" left="15" ");
      document.write("top="15" visibility="show"><img src="");
      document.write(snowflake + "" border="0"></layer>");
    }
  } else if (ie4up) {
    if (i == 0) {
      document.write("<div id="dot"+ i +"" style="POSITION: ");
      document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
      document.write("visible; TOP: 15px; LEFT: 15px;"><img src="");
      document.write(snowflake + "" border="0"></div>");
    } else {
      document.write("<div id="dot"+ i +"" style="POSITION: ");
      document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
      document.write("visible; TOP: 15px; LEFT: 15px;"><img src="");
      document.write(snowflake + "" border="0"></div>");
    }
  }
}
function snowNS() {  // Netscape main animation function
  for (i = 0; i < no; ++ i) {  // iterate for every dot
    yp += sty;
    if (yp > doc_height-50) {
      xp = Math.random()*(doc_width-am-30);
      yp = 0;
      stx = 0.02 + Math.random()/10;
      sty = 0.7 + Math.random();
      doc_width = self.innerWidth;
      doc_height = self.innerHeight;
    }
    dx += stx;
    document.layers["dot"+i].top = yp;
    document.layers["dot"+i].left = xp + am*Math.sin(dx);
  }
  setTimeout("snowNS()", speed);
}

function snowIE() {  // IE main animation function
  for (i = 0; i < no; ++ i) {  // iterate for every dot
    yp += sty;
    if (yp > doc_height-50) {
      xp = Math.random()*(doc_width-am-30);
      yp = 0;
      stx = 0.02 + Math.random()/10;
      sty = 0.7 + Math.random();
      doc_width = document.body.clientWidth;
      doc_height = document.body.clientHeight;
    }
    dx += stx;
    document.all["dot"+i].style.pixelTop = yp;
    document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
  }
  setTimeout("snowIE()", speed);
}

if (ns4up) {
  snowNS();
} else if (ie4up) {
  snowIE();
}
</script>



Avatar Image
Colega ;)
Colega ;)

Usa el codigo que te he puesto yo y cambia: URL por http://www.altan.hr/snow/dot.gif



kcuca eso se pone en la cabecera del foro. Si es para una web en cualquier parte del codigo (entre <body> y </body&gtGiño

Avatar Image
@man / @woman
@man / @woman

Cuando se acercan las navidades, se van viendo muchas consultas sobre este efecto para los foros...
EffectedCard, yo que tu le ponia chincheta....
Giño

Avatar Image
Colega ;)
Colega ;)

De momento, no. Si veo que se repite, la pondre Giño


Y gracias por la advertencia Sonrisa Gigante

Adm.Flamenco
Come y duerme en el foro
Come y duerme en el foro
Escrito originalmente por EffectedCard
Usa el codigo que te he puesto yo y cambia: URL por http://www.altan.hr/snow/dot.gif



kcuca eso se pone en la cabecera del foro. Si es para una web en cualquier parte del codigo (entre <body> y </body&gtGiño

Nada, como veras he hecho lo mismo que tu me dices... no sale nada
he puesto el codigo en la cabecera.
Nose...
Avatar Image
Colega ;)
Colega ;)

Ese codigo lo probe yo y funcionaba perfectamente... loco algo haras mal

Adm.Flamenco
Come y duerme en el foro
Come y duerme en el foro

Pues la verdad no lo se, estoy poniendo el codigo en la cabecera arriba del todo, o despues del codigo de tipo de texto, lo he probado de las 2 formas.
Si ves mi codigo solo he modificado lo de la Url, que hay en la 3 o 4 lineas primeras, nose si abra que modificar algo mas...
Nose es bastante raro.
Me he fijado si era por el Firefox, pero tampoco.

kcuca
Machacateclados
Machacateclados

A mi si me resulto,pero los copos de nieve son quizas muy grandes y muy rapida su caida,casi que marea,de donde puedo sacar mas efectos parecidos a este,de este tipo,efectos navideños.
Gracias.

Avatar Image
Usuario Novato
Usuario Novato
Escrito originalmente por Yekipe
Pues la verdad no lo se, estoy poniendo el codigo en la cabecera arriba del todo, o despues del codigo de tipo de texto, lo he probado de las 2 formas.
Si ves mi codigo solo he modificado lo de la Url, que hay en la 3 o 4 lineas primeras, nose si abra que modificar algo mas...
Nose es bastante raro.
Me he fijado si era por el Firefox, pero tampoco.


Lo mismo me pasa a mí, lo pongo arriba del todo, o debajo de mi cabecera y no sale nada........podrian repasar el código a ver si nos falla algo o decirnos que puede ser??? Enfurruñado

Yo tambien lo he probado de muchas fornas y nada, no me sale LlorandoLlorandoLlorando
Avatar Image
Nació y murió en el foro
Nació y murió en el foro

Yo tambine lo he probado y nada

Avatar Image
Colega ;)
Colega ;)

He buscado un par de codigos mas pero no los he probado, seguramente sean hasta los mismos


1º Cambiar: var snowsrc="gif_jpg/snow3.gif"

Codigo PHP:

<script language="JavaScript1.2">


  //Configure below to change URL path to the snow image
  var snowsrc="gif_jpg/snow3.gif"
  // Configure below to change number of snow to render
  var no = 10;

  var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

  var dx, xp, yp;    // coordinate and position variables
  var am, stx, sty;  // amplitude and step variables
  var i, doc_width = 800, doc_height = 600;
  
  if (ns4up||ns6up) {
    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 = 0;                        // set coordinate variables
    xp = Math.random()*(doc_width-50);  // set position variables
    yp = Math.random()*doc_height;
    am = Math.random()*20;         // set amplitude variables
    stx = 0.02 + Math.random()/10; // set step variables
    sty = 0.7 + Math.random();     // set step variables
    if (ns4up) {                      // set layers
      if (i == 0) {
        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"https://www.webcindario.com/yomaster/principal.htm/\"><img src='"+snowsrc+"' border=\"0\"></a></layer>");
      } else {
        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><img src='"+snowsrc+"' border=\"0\"></layer>");
      }
    } else if (ie4up||ns6up) {
      if (i == 0) {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"https://www.webcindario.com/yomaster/principal.htm\"><img src='"+snowsrc+"' border=\"0\"></a></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() {  // Netscape main animation function
    for (i = 0; i < no; ++ i) {  // iterate for every dot
      yp += sty;
      if (yp > doc_height-50) {
        xp = Math.random()*(doc_width-am-30);
        yp = 0;
        stx = 0.02 + Math.random()/10;
        sty = 0.7 + Math.random();
        doc_width = self.innerWidth;
        doc_height = self.innerHeight;
      }
      dx += stx;
      document.layers["dot"+i].top = yp;
      document.layers["dot"+i].left = xp + am*Math.sin(dx);
    }
    setTimeout("snowNS()", 10);
  }

  function snowIE_NS6() {  // IE and NS6 main animation function
    for (i = 0; i < no; ++ i) {  // iterate for every dot
      yp += sty;
      if (yp > doc_height-50) {
        xp = Math.random()*(doc_width-am-30);
        yp = 0;
        stx = 0.02 + Math.random()/10;
        sty = 0.7 + Math.random();
        doc_width = ns6up?window.innerWidth : document.body.clientWidth;
        doc_height = ns6up?window.innerHeight : document.body.clientHeight;
      }
      dx += stx;
      if (ie4up){
      document.all["dot"+i].style.pixelTop = yp;
      document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
      }
      else if (ns6up){
      document.getElementById("dot"+i).style.top=yp;
      document.getElementById("dot"+i).style.left=xp + am*Math.sin(dx);
      }   
    }
    setTimeout("snowIE_NS6()", 10);
  }

  if (ns4up) {
    snowNS();
  } else if (ie4up||ns6up) {
    snowIE_NS6();
  }

    </script>






2º Configurar desde CONFIGURATION STARTS HERE hasta CONFIGURATION ENDS HERE
Codigo PHP:

<script>
// CREDITS:
// Snowmaker
// By Peter Gehrig
// Copyright (c) 2003 Peter Gehrig. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at <a href="http://www.24fun.com" target="_blank">http://www.24fun.com</a>
// <a href='mailto:info@24fun.com'>info@24fun.com</a>
// 11/27/2003

// IMPORTANT:
// If you add this script to a script-library or script-archive
// you have to add a highly visible link to
// <a href="http://www.24fun.com" target="_blank">http://www.24fun.com</a> on the webpage
// where this script will be featured

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION STARTS HERE
///////////////////////////////////////////////////////////////////////////

// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// Set the letter that creates your snowflake (recommended:*)
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximal-size of your snowflaxes
var snowmaxsize=22

// Set the minimal-size of your snowflaxes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=3

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)  
var browserok=ie5||ns6||opera

function randommaker(range) {        
    rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
    if (ie5 || opera) {
        marginbottom = document.body.clientHeight
        marginright = document.body.clientWidth
    }
    else if (ns6) {
        marginbottom = window.innerHeight
        marginright = window.innerWidth
    }
    var snowsizerange=snowmaxsize-snowminsize
    for (i=0;i<=snowmax;i++) {
        crds = 0;                      
        lftrght = Math.random()*15;         
        x_mv = 0.03 + Math.random()/10;
        snow=document.getElementById("s"+i)
        snow.style.fontFamily=snowtype[randommaker(snowtype.length)]
        snow.size=randommaker(snowsizerange)+snowminsize
        snow.style.fontSize=snow.size
        snow.style.color=snowcolor[randommaker(snowcolor.length)]
        snow.sink=sinkspeed*snow.size/5
        if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}
        if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}
        if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}
        if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}
        snow.posy=randommaker(2*marginbottom-marginbottom-2*snow.size)
        snow.style.left=snow.posx
        snow.style.top=snow.posy
    }
    movesnow()
}

function movesnow() {
    for (i=0;i<=snowmax;i++) {
        crds += x_mv;
        snow.posy+=snow.sink
        snow.style.left=snow.posx+lftrght*Math.sin(crds);
        snow.style.top=snow.posy
        
        if (snow.posy>=marginbottom-2*snow.size || parseInt(snow.style.left)>(marginright-3*lftrght)){
            if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}
            if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}
            if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}
            if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}
            snow.posy=0
        }
    }
    var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
    document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
    window.onload=initsnow
}
</script>





3º Cambiar: var snowflake = "dot.gif";
Codigo PHP:

<script>
<!-- Mas trucos y scripts en <a href="http://www.javascript.com.mx" target="_blank">http://www.javascript.com.mx</a> -->

var no = 15; // snow number
var speed = 15; // smaller number moves the snow faster
var snowflake = "dot.gif";

var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 400, doc_height = 500;
if (ns4up) {
  doc_width = self.innerWidth;
  doc_height = self.innerHeight;
} else if (ie4up) {
  doc_width = 500;
  doc_height = 500;
}
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 = 0;                        // set coordinate variables
  xp = Math.random()*(doc_width-50);  // set position variables
  yp = Math.random()*doc_height;
  am = Math.random()*20;         // set amplitude variables
  stx = 0.02 + Math.random()/10; // set step variables
  sty = 0.7 + Math.random();     // set step variables
  if (ns4up) {                      // set layers
    if (i == 0) {
      document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
      document.write("top=\"15\" visibility=\"show\"><img src=\"");
      document.write(snowflake + "\" border=\"0\"></layer>");
    } else {
      document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
      document.write("top=\"15\" visibility=\"show\"><img src=\"");
      document.write(snowflake + "\" border=\"0\"></layer>");
    }
  } else if (ie4up) {
    if (i == 0) {
      document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
      document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
      document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
      document.write(snowflake + "\" border=\"0\"></div>");
    } else {
      document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
      document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
      document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
      document.write(snowflake + "\" border=\"0\"></div>");
    }
  }
}
function snowNS() {  // Netscape main animation function
  for (i = 0; i < no; ++ i) {  // iterate for every dot
    yp += sty;
    if (yp > doc_height-50) {
      xp = Math.random()*(doc_width-am-30);
      yp = 0;
      stx = 0.02 + Math.random()/10;
      sty = 0.7 + Math.random();
      doc_width = self.innerWidth;
      doc_height = self.innerHeight;
    }
    dx += stx;
    document.layers["dot"+i].top = yp;
    document.layers["dot"+i].left = xp + am*Math.sin(dx);
  }
  setTimeout("snowNS()", speed);
}

function snowIE() {  // IE main animation function
  for (i = 0; i < no; ++ i) {  // iterate for every dot
    yp += sty;
    if (yp > doc_height-50) {
      xp = Math.random()*(doc_width-am-30);
      yp = 0;
      stx = 0.02 + Math.random()/10;
      sty = 0.7 + Math.random();
      doc_width = document.body.clientWidth;
      doc_height = document.body.clientHeight;
    }
    dx += stx;
    document.all["dot"+i].style.pixelTop = yp;
    document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
  }
  setTimeout("snowIE()", speed);
}

if (ns4up) {
  snowNS();
} else if (ie4up) {
  snowIE();
}
</script>

Adm.Flamenco
Come y duerme en el foro
Come y duerme en el foro

JaJaJa, he puesto el primer codigo, y si que me va, gracias EffectedCard, pero son graciosisimos los copos, parecen cohetes, a la velocidad que van, me parto. jajaja.
No se podra reducir un pokito la velocidad no? jajajaMuchas risas

Adm.Flamenco
Come y duerme en el foro
Come y duerme en el foro

Bueno, he probado otro javascript, y es de puta madre:

Codigo PHP:

<script>
// CREDITS:
// Snowmaker
// By Peter Gehrig
// Copyright (c) 2003 Peter Gehrig. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at <a href="http://www.24fun.com" target="_blank">http://www.24fun.com</a>
// <a href='mailto:info@24fun.com'>info@24fun.com</a>
// 11/27/2003

// IMPORTANT:
// If you add this script to a script-library or script-archive
// you have to add a highly visible link to
// <a href="http://www.24fun.com" target="_blank">http://www.24fun.com</a> on the webpage
// where this script will be featured

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION STARTS HERE
///////////////////////////////////////////////////////////////////////////

// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// Set the letter that creates your snowflake (recommended:*)
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximal-size of your snowflaxes
var snowmaxsize=22

// Set the minimal-size of your snowflaxes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=3

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)  
var browserok=ie5||ns6||opera

function randommaker(range) {        
    rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
    if (ie5 || opera) {
        marginbottom = document.body.clientHeight
        marginright = document.body.clientWidth
    }
    else if (ns6) {
        marginbottom = window.innerHeight
        marginright = window.innerWidth
    }
    var snowsizerange=snowmaxsize-snowminsize
    for (i=0;i<=snowmax;i++) {
        crds = 0;                      
        lftrght = Math.random()*15;         
        x_mv = 0.03 + Math.random()/10;
        snow=document.getElementById("s"+i)
        snow.style.fontFamily=snowtype[randommaker(snowtype.length)]
        snow.size=randommaker(snowsizerange)+snowminsize
        snow.style.fontSize=snow.size
        snow.style.color=snowcolor[randommaker(snowcolor.length)]
        snow.sink=sinkspeed*snow.size/5
        if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}
        if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}
        if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}
        if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}
        snow.posy=randommaker(2*marginbottom-marginbottom-2*snow.size)
        snow.style.left=snow.posx
        snow.style.top=snow.posy
    }
    movesnow()
}

function movesnow() {
    for (i=0;i<=snowmax;i++) {
        crds += x_mv;
        snow.posy+=snow.sink
        snow.style.left=snow.posx+lftrght*Math.sin(crds);
        snow.style.top=snow.posy
        
        if (snow.posy>=marginbottom-2*snow.size || parseInt(snow.style.left)>(marginright-3*lftrght)){
            if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}
            if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}
            if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}
            if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}
            snow.posy=0
        }
    }
    var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
    document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
    window.onload=initsnow
}
</script>



Azul_plata
Usuario habitual
Usuario habitual

Este último me fumciona pero me sale solo un poquito de nieve en la cabezera y yo lo quiero por todos lados jejeje

Avatar Image
Colega ;)
Colega ;)

No se configurar esos javascripts.

Avatar Image
Machacateclados
Machacateclados

Yo lo tengo puesto y queda bastante chulo.

Puedes pinchar aquí para verlo.

El código que he insertado es:


<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="http://www.telefonica.net/web2/elrincondeltcp/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.getElementById&&!document.all) ? 1 : 0;

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
for (i = 0; i < no; ++ i) {
dx = 0; // set coordinate variables
xp = Math.random()*(doc_width-50); // set position variables
yp = Math.random()*doc_height;
am = Math.random()*20; // set amplitude variables
stx = 0.02 + Math.random()/10; // set step variables
sty = 0.7 + Math.random(); // set step variables
if (ie4up||ns6up) {
if (i == 0) {
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>");
} 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 snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every dot
yp += sty;
if (yp > doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
}
dx += stx;
document.getElementById("dot"+i).style.top=yp+"px";
document.getElementById("dot"+i).style.left=xp + am*Math.sin(dx)+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}

function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}


if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}

</script>

Un saludo

asucarillo
Usuario habitual
Usuario habitual
Escrito originalmente por Yekipe
Bueno, he probado otro javascript, y es de puta madre:
Codigo PHP:

<script>
// CREDITS:
// Snowmaker
// By Peter Gehrig
// Copyright (c) 2003 Peter Gehrig. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at <a href="http://www.24fun.com" target="_blank">http://www.24fun.com</a>
// <a href='mailto:info@24fun.com'>info@24fun.com</a>
// 11/27/2003

// IMPORTANT:
// If you add this script to a script-library or script-archive
// you have to add a highly visible link to
// <a href="http://www.24fun.com" target="_blank">http://www.24fun.com</a> on the webpage
// where this script will be featured

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION STARTS HERE
///////////////////////////////////////////////////////////////////////////

// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=35

// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#aaaacc","#ddddFF","#ccccDD")

// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Arial Black","Arial Narrow","Times","Comic Sans MS")

// Set the letter that creates your snowflake (recommended:*)
var snowletter="*"

// Set the speed of sinking (recommended values range from 0.3 to 2)
var sinkspeed=0.6

// Set the maximal-size of your snowflaxes
var snowmaxsize=22

// Set the minimal-size of your snowflaxes
var snowminsize=8

// Set the snowing-zone
// Set 1 for all-over-snowing, set 2 for left-side-snowing
// Set 3 for center-snowing, set 4 for right-side-snowing
var snowingzone=3

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////


// Do not edit below this line
var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)  
var browserok=ie5||ns6||opera

function randommaker(range) {        
    rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
    if (ie5 || opera) {
        marginbottom = document.body.clientHeight
        marginright = document.body.clientWidth
    }
    else if (ns6) {
        marginbottom = window.innerHeight
        marginright = window.innerWidth
    }
    var snowsizerange=snowmaxsize-snowminsize
    for (i=0;i<=snowmax;i++) {
        crds = 0;                      
        lftrght = Math.random()*15;         
        x_mv = 0.03 + Math.random()/10;
        snow=document.getElementById("s"+i)
        snow.style.fontFamily=snowtype[randommaker(snowtype.length)]
        snow.size=randommaker(snowsizerange)+snowminsize
        snow.style.fontSize=snow.size
        snow.style.color=snowcolor[randommaker(snowcolor.length)]
        snow.sink=sinkspeed*snow.size/5
        if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}
        if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}
        if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}
        if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}
        snow.posy=randommaker(2*marginbottom-marginbottom-2*snow.size)
        snow.style.left=snow.posx
        snow.style.top=snow.posy
    }
    movesnow()
}

function movesnow() {
    for (i=0;i<=snowmax;i++) {
        crds += x_mv;
        snow.posy+=snow.sink
        snow.style.left=snow.posx+lftrght*Math.sin(crds);
        snow.style.top=snow.posy
        
        if (snow.posy>=marginbottom-2*snow.size || parseInt(snow.style.left)>(marginright-3*lftrght)){
            if (snowingzone==1) {snow.posx=randommaker(marginright-snow.size)}
            if (snowingzone==2) {snow.posx=randommaker(marginright/2-snow.size)}
            if (snowingzone==3) {snow.posx=randommaker(marginright/2-snow.size)+marginright/4}
            if (snowingzone==4) {snow.posx=randommaker(marginright/2-snow.size)+marginright/2}
            snow.posy=0
        }
    }
    var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
    document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
    window.onload=initsnow
}
</script>





exacto... me encanta este... como se podria modificar para tener nieve por todos los lados y no solo en la cabecera???
Avatar Image
Nació y murió en el foro
Nació y murió en el foro

He probado este y em va bien pero si intento ponerun copo mas grande casca, sabeis a qeu puede ser debido, o cual es el tamaño maximo del copo

Escrito originalmente por JumpSeat
Yo lo tengo puesto y queda bastante chulo.

Puedes pinchar aquí para verlo.

El código que he insertado es:


<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="http://www.telefonica.net/web2/elrincondeltcp/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&quotGiño
var snowdistance = "pageheight";

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





var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat&quotGiño? document.documentElement : document.body
}

var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com&quotGiño!=-1)? "snow.gif" : snowsrc
for (i = 0; i < no; ++ i) {
dx = 0; // set coordinate variables
xp = Math.random()*(doc_width-50); // set position variables
yp = Math.random()*doc_height;
am = Math.random()*20; // set amplitude variables
stx = 0.02 + Math.random()/10; // set step variables
sty = 0.7 + Math.random(); // set step variables
if (ie4up||ns6up) {
if (i == 0) {
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>&quotGiño;
} 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>&quotGiño;
}
}
}

function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight&quotGiño? window.innerHeight : (ie4up && snowdistance=="windowheight&quotGiño? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight&quotGiño? iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every dot
yp += sty;
if (yp > doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
}
dx += stx;
document.getElementById("dot"+i).style.top=yp+"px";
document.getElementById("dot"+i).style.left=xp + am*Math.sin(dx)+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}

function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}


if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}

</script>

Un saludo
Avatar Image
Nació y murió en el foro
Nació y murió en el foro

Vale no va bien...... hay veces que se ve bien y veces que parecen cohetes

Avatar Image
Colega ;)
Colega ;)

Elige otro pues Giño

Avatar Image
Machacateclados
Machacateclados

Yo he encontrado este script pero no se porque cuando lo configuro en el frontpage me va perfecto pero luego cuando lo pego en la cabecera del foro y entro en el no me salen los copos, ¿hay que hacer algo especial?

Codigo PHP:

<SCRIPT LANGUAGE="JavaScript">

var no = 25; // snow number
var speed = 10; // smaller number moves the snow faster
var snowflake = "http://amberevans.iespana.es/banner/snow.gif";

var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;    // coordinate and position variables
var am, stx, sty;  // amplitude and step variables
var i, doc_width = 800, doc_height = 600;
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 = 0;                        // set coordinate variables
xp = Math.random()*(doc_width-50);  // set position variables
yp = Math.random()*doc_height;
am = Math.random()*20;         // set amplitude variables
stx = 0.02 + Math.random()/10; // set step variables
sty = 0.7 + Math.random();     // set step variables
if (ns4up) {                      // set layers
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
   }
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
      }
   }
}
function snowNS() {  // Netscape main animation function
for (i = 0; i < no; ++ i) {  // iterate for every dot
yp += sty;
if (yp > doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx += stx;
document.layers["dot"+i].top = yp;
document.layers["dot"+i].left = xp + am*Math.sin(dx);
}
setTimeout("snowNS()", speed);
}
function snowIE() {  // IE main animation function
for (i = 0; i < no; ++ i) {  // iterate for every dot
yp += sty;
if (yp > doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx += stx;
document.all["dot"+i].style.pixelTop = yp;
document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
}
setTimeout("snowIE()", speed);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}

</script>

esina
Usuario habitual
Usuario habitual
Llorando lo he intentado todo y nada.

Se donde colocarlo y cuando voy a mi foro, para ver como ha quedado, o bien, no sale nada, o bien, caen los copos a velocidad de vertigo y no se sabe ni lo que son... o bien, salia uno de ellos muyyy bien, pero el copo no... salia la X ..

o sea, que no consigo nada...

Avatar Image
Machacateclados
Machacateclados

lo habéis puesto al principio del todo de la cabecera? Yo es q lo ponía en la cabecera pero no salía y al ponerlo un día al inicio inicio funcionó. Lo malo es que se me ralentiza el foro mucho, pero bueno, los copos caen.

Adm.Flamenco
Come y duerme en el foro
Come y duerme en el foro

Si siempre al principio de la cabezera.
Tengo otro efecto de nieve, ke sin dudarlo me kedo con este, es el que he puesto hoy mismo, lo he sacado de una web.

Codigo PHP:

<body><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="http://www.elseptimoarte.net/html/images/snow4.gif"
  // Configure below to change number of snow to render
  var no = 5;
  // 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 = "windowheight";

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

  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

    function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
    }

  var dx, xp, yp;    // coordinate and position variables
  var am, stx, sty;  // amplitude and step variables
  var i, doc_width = 800, doc_height = 600;
  
  if (ns6up) {
    doc_width = self.innerWidth;
    doc_height = self.innerHeight;
  } else if (ie4up) {
    doc_width = iecompattest().clientWidth;
    doc_height = iecompattest().clientHeight;
  }

  dx = new Array();
  xp = new Array();
  yp = new Array();
  am = new Array();
  stx = new Array();
  sty = new Array();
  snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow4.gif" : snowsrc
  for (i = 0; i < no; ++ i) {  
    dx = 0;                        // set coordinate variables
    xp = Math.random()*(doc_width-50);  // set position variables
    yp = Math.random()*doc_height;
    am = Math.random()*20;         // set amplitude variables
    stx = 0.02 + Math.random()/10; // set step variables
    sty = 0.7 + Math.random();     // set step variables
        if (ie4up||ns6up) {
      if (i == 0) {
        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>");
      } 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 snowIE_NS6() {  // IE and NS6 main animation function
    doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
        doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
    for (i = 0; i < no; ++ i) {  // iterate for every dot
      yp += sty;
      if (yp > doc_height-50) {
        xp = Math.random()*(doc_width-am-30);
        yp = 0;
        stx = 0.02 + Math.random()/10;
        sty = 0.7 + Math.random();
      }
      dx += stx;
      document.getElementById("dot"+i).style.top=yp+"px";
      document.getElementById("dot"+i).style.left=xp + am*Math.sin(dx)+"px";  
    }
    snowtimer=setTimeout("snowIE_NS6()", 10);
  }

    function hidesnow(){
        if (window.snowtimer) clearTimeout(snowtimer)
        for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
    }
        

if (ie4up||ns6up){
    snowIE_NS6();
        if (hidesnowtime>0)
        setTimeout("hidesnow()", hidesnowtime*1000)
        }

</script></body>

esina
Usuario habitual
Usuario habitual

es demasiado rapido , apenas se ven los copos Enfurruñado

Avatar Image
Machacateclados
Machacateclados
Escrito originalmente por ChispazoGrana
lo habéis puesto al principio del todo de la cabecera? Yo es q lo ponía en la cabecera pero no salía y al ponerlo un día al inicio inicio funcionó. Lo malo es que se me ralentiza el foro mucho, pero bueno, los copos caen.


Tampoco lo he probado y nada
Avatar Image
Come y duerme en el foro
Come y duerme en el foro

ESTO EN CABECERA

<style>
.drop { position: absolute; width: 3; filter: flipV(), flipH(); font-size: 40; color: blue }
</style>
<script language="javascript">

/******************************************
* Efecto Nieve Script - HTML.Dynamico 2001
* Mas Scripts y Recursos para tu web en:
* http://www.htmldynamico.cjb.net
******************************************/

snow = false; // 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=50; 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>

<style>
.drop { position: absolute; width: 3; filter: flipV(), flipH(); font-size: 40; color: blue }
</style>
<script language="javascript">

/******************************************
* Efecto Nieve Script - HTML.Dynamico 2001
* Mas Scripts y Recursos para tu web en:
* http://www.htmldynamico.cjb.net
******************************************/

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=50; 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>



ESTO EN PIE DE PAGINA


<script language="javascript">

if (document.all){
drop = new Array(); xx = new Array(); yy = new Array(); mv = new Array()
ly = "document.all['"; st = "'].style"
for(make = 0; make < drops; make++){
document.write('<div id="drop'+make+'" class=drop>'+sym+'</div>');
drop[make] = eval(ly+'drop'+make+st);
maxx = document.body.clientWidth-40
maxy = document.body.clientHeight-40
xx[make] = Math.random()*maxx;
yy[make] = -100-Math.random()*maxy;
drop[make].left = xx[make]
drop[make].top = yy[make]
mv[make] = (Math.random()*5)+speed/4;
drop[make].fontSize = (Math.random()*10)+20;
if(snow){col = 'white'}else{col = 'blue'}
drop[make].color = col;
}
window.onload=moverain
}
</script>

31 Mensajes
12
ATENCIÓN: Este tema no tiene actividad desde hace más de 6 MESES,
te recomendamos abrir un nuevo tema en lugar de responder al actual
Opciones:
Ir al subforo:
Permisos:
TU NO PUEDES Escribir nuevos temas
TU NO PUEDES Responder a los temas
TU NO PUEDES Editar tus propios mensajes
TU NO PUEDES Borrar tus propios mensajes
Temas similares
TemaUsuariosRespuestasVisitasActividad
Por: , el 05/Dic/2007, 13:18
Bilkov02kDec/07
Por: , el 31/Oct/2008, 15:27
sor-tija Ellocodelataquilla Speeeeder Nevessta62kNov/08
Por: , el 27/Dic/2007, 00:42
ALESAIM PaseanteDelForo12kDec/07
Por: , el 07/Dic/2003, 04:42
el_GuiYe Lucas57 NoSetup.org ladyvampcruel chavp2621kDec/03