Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/08/2005, 20:54
Avatar de Bandit
Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Hola Frasco:
Crea un MC vacío y al ponerlo en el escenario le pones como nombre de instancia: photo
En la capa 2 frame 1 coloca 2 botones.
En la capa 3 frame 1 pon éste código:
this.pathToPics = "imagenes/";
this.pArray = ["ft1.jpg", "ft2.jpg", "ft3.jpg", "ft4.jpg"];
this.fadeSpeed = 5;
this.pIndex = 0;
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
muestra = "Foto Nº"+(this.pIndex+1)+" "+this.pArray[0];
MovieClip.prototype.changePhoto = function(d) {
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
var p = _root.photo;
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
muestra = "Foto Nº"+(this.pIndex+1)+" "+this.pArray[this.pIndex];
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};

En el primer botón: (Con éste botón retrocedes la secuencia de las fotos)
on (release) {
this.changePhoto(-1);
}
En el segundo botón: (Con éste botón avanzas)
on (release) {
this.changePhoto(1);
}
Tus fotos las pones en un carpeta que se llame: imagenes y a cada una de ellas las nombras así: ft1, ft2, etc.

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/