Ver Mensaje Individual
  #4 (permalink)  
Antiguo 07/07/2002, 16:05
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 1 mes
Puntos: 61
Re: Aconsejenme.script Piramide De Fotos

<html>
<head>
<title>Pirámide</title>
<style>
img{
position : absolute;
height : 60px;
width : 40px;
border : 1px solid #483D8B;}
#Foto1{
top : 30px;
left : 380px;
}
#Foto2{
top : 90px;
left : 360px;

}
#Foto3{
top : 90px;
left : 400px;
}
#Foto4{
top : 150px;
left : 340px;
}
#Foto5{
top : 150px;
left : 380px;

}
#Foto6{
top : 150px;
left : 420px;

}
#Foto7{
top : 210px;
left : 320px;

}
#Foto8{
top : 210px;
left : 360px;
}
#Foto9{
top : 210px;
left : 400px;
}
#Foto10{
top :210px;
left : 440px;
}
</style>
<script>
imagen= new Array('images1.jpg','images2.jpg','images3.jpg','i mages4.jpg','images5.jpg','images6.jpg','images7.j pg','images8.jpg','images9.jpg','images10.jpg');
numero= new Array;

function cambio(){
for (aa=0; aa<imagen.length; aa++){
numero[aa] = Math.random() * imagen.length
numero[aa] = Math.floor(numero[aa])
}
document.foto1.src=imagen[numero[1]];
document.foto2.src=imagen[numero[2]];
document.foto3.src=imagen[numero[3]];
document.foto4.src=imagen[numero[4]];
document.foto5.src=imagen[numero[5]];
document.foto6.src=imagen[numero[6]];
document.foto7.src=imagen[numero[7]];
document.foto8.src=imagen[numero[8]];
document.foto9.src=imagen[numero[9]];
document.foto10.src=imagen[numero[0]];

setTimeout("cambio()",300);
}


</script>

</head>

<body onload="cambio()">

<img name="foto[1]" id="foto1">
<img name="foto[10]" id="foto10">
<img name="foto[2]" id="foto2">
<img name="foto[3]" id="foto3">
<img name="foto[4]" id="foto4">
<img name="foto[5]" id="foto5">
<img name="foto[6]" id="foto6">
<img name="foto[7]" id="foto7">
<img name="foto[8]" id="foto8">
<img name="foto[9]" id="foto9">
</body>
</html>

No sé como meter en un Array los nombres de las imagenes... la verdad es que yo tampoco soy muy bueno con Jaascript...

El caso es que tenemos un comienzo. Sigo con el trabajo!