![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
26/03/2006, 08:09
|
![Avatar de KarlanKas](http://static.forosdelweb.com/customavatars/avatar11549_2.gif) | Moderador extraterrestre | | Fecha de Ingreso: diciembre-2001 Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 1 mes Puntos: 61 | |
Para lo que quieres hay un script que tomé de no sé dónde que hace transiciones de una imagen a otra con javascript. El problema está en que los efectos sólo se verán en IE, aunque la transición se hará en todos los navegadores.
En el array pics pondrás las imágenes que quieres que vayan cambiándose.
Un ejemplo es:
Código:
<html>
<head>
<title>Untitled</title>
<script>
<!-- Original: CodeLifter.com ([email protected]) -->
<!-- Web Site: http://www.codelifter.com -->
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 6000;
// Duration of crossfade (seconds)
var crossFadeDuration =2;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'img/sucesion1.jpg'
Pic[1] = 'img/sucesion2.jpg'
Pic[2] = 'img/sucesion3.jpg'
// do not edit anything below this line
var t;
var j = 1;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.imagen3.style.filter="blendTrans(duration="+crossFadeDuration+")";
document.images.imagen3.filters.blendTrans.Apply();
}
document.images.imagen3.src = preLoad[j].src;
if (document.all) {
document.images.imagen3.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
// End -->
</script>
</head>
<body>
<img src="transicion0.jpg" name="imagen3" />
</body>
</html>
Un saludo!
__________________ Cómo escribir
No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia. |