Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/10/2005, 13:10
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 Zhak:
Esta sería una forma de hacerlo sin tener las imágenes dentro del Flash de ese modo evitas el peso de tu película.
Crea tus botones adelante y atras.
En el primer botón coloca éste código con lo cual puedes pasar las imágenes también con la tecla direccional izquierda:
on (release, keyPress "<Left>") {
this.changePhoto(-1);
}

En el otro botón:
on (release, keyPress "<Right>") {
this.changePhoto(1);
}
Coloca un MC vacío en el escenario en el lugar donde quieres que se vea la imagen y le pones como nombre de instancia: photo.
Crea la capa 2 en el frame 1 coloca é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;
}
};

A tus imágenes tienes que nombrarlos como: [B]ft1.jpg, ft2.jpg, ft3.jpg, ft4.jpg, etc y ponerlo en una sub_carpeta llamada: imagenes.

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