Ver Mensaje Individual
  #5 (permalink)  
Antiguo 17/07/2006, 10:49
Avatar de ceaped
ceaped
 
Fecha de Ingreso: febrero-2004
Mensajes: 2.185
Antigüedad: 20 años, 2 meses
Puntos: 9
Hola bandit.
Realice el ejecicio que me sugeriste de tu sitio web y no me funciona.
Yo hice un MC llamado photo.
Agregue dos botoes con este code:
Para avanzar
on (release, keyPress "<Right>") {
this.changephoto(1);
}


y para retroceder
on (release, keyPress "<Left>") {
this.changephoto(-1);
}

en otro fotograma puse este code:
this.pathToPics = "imagenes/";
this.pArray = ["img1.jpg", "img2.jpg", "img3.jpg", "img4.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, I, t;
I = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == I) {
this.onEnterFrame = fadeIn;
} else {
trace(I/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;
}
};

y cree una carpeta llamada imagenes y dentro de ella grabe 4 fotos llamadas img1......etc
que tengo malo?
gracias por tu ayuda
__________________
Diseñador Gráfico publicitario