Avatar Image
Usuario habitual
Usuario habitual

Ok Chekeen esta web http://insanes.co.uk, lo que quiero hacer algo asi en mi web, como le ago ? con lo de la nueva para que caiga de arriba a abajo ?

Avatar Image
Morta - The One -
Morta - The One -

Supongo que te refieres a lo de la nieve.

Este es el codigo:
<script language="JavaScript1.2">

/*
Snow Effect Script
Submitted by Altan d.o.o. (snow@altan.hr, http://www.altan.hr/snow/index.html)
Permission granted to Dynamicdrive.com to feature script in archive
Para el código de fuente completo a esta escritura, visita http://dynamicdrive.com
*/


//Configura abajo la URL de la imagen
var snowsrc="http://www.direcciondelaimagen.gif"
// Configura abajo el número de imagenes que apareceran
var no = 20;

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

var dx, xp, yp; // variables de coordenada y posición
var am, stx, sty; // variables de amplitud y de paso
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; // variables coordinadas determinadas
xp = Math.random()*(doc_width-50); // fija las variables de la posición
yp = Math.random()*doc_height;
am = Math.random()*20; // fija las variables de la amplitud
stx = 0.02 + Math.random()/10; // fija las variables del paso
sty = 0.7 + Math.random(); // fija las variables del paso
if (ns4up) { // fija las capas
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" visibility=\"show\"><a href=\"http://dynamicdrive.com/\"><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=\"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 snowNS() { // Función principal de la animación de Netscape
for (i = 0; i < no; ++ i) {
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() { // Función principal de la animación de IE y NS6
for (i = 0; i < no; ++ i) {
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>


Y la imagen por si quieres utilizarla es esta

Este script esta sacado de esta otra pagina: http://dynamicdrive.com

________________________________________
Prueba con este codigo, lo he traducido pa que veas mas o menos que es lo hace cada cosilla, como siempre modifica la direccion de la imagen que quieras poner.


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

Morta he probado el script pero... los copos de nieve caen como meteoritos cabreaos tio jejeje. ¿A ti te va bien?

Avatar Image
Machacateclados
Machacateclados
Escrito originalmente por Ikerman
Morta he probado el script pero... los copos de nieve caen como meteoritos cabreaos tio jejeje. ¿A ti te va bien?

Tb probé el script, y no se parece al efecto k kiere eLGiOvA
Avatar Image
Morta - The One -
Morta - The One -

Pos la verdad es que si que parecian meteoritos.
Pero traigo la solucion definita, bajarse este archivo
Se ve que mi@ al insertar el mensaje modifica alguna cosa del codigo, que aun no he logrado descubrir.

Enga saludos.


Avatar Image
Machacateclados
Machacateclados

oye sory x las molestias, pero tngo problemas bajando el archivo, no tiene extención!!

Avatar Image
Morta - The One -
Morta - The One -

Joer macho, que mala suerte tengo
esto es un complot, xddd

Ponle la extension .rar que esta comprimido con winrar.

enga, a ver si ahora hay suerte


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
No se han encontrado temas similares