Tema: galeria foto
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 07/02/2008, 14:41
Avatar de 8BALL
8BALL
 
Fecha de Ingreso: noviembre-2006
Mensajes: 36
Antigüedad: 17 años, 5 meses
Puntos: 0
Re: galeria foto

Gracias por vuestra ayuda!!

El tuto de kirupa no lo he hecho por el tema del ingles, que me cuesta.
He reproducido el codigo de bandit pero no me funciona. Sale la primera foto y al clikar botón derecho desaparece...y ya no hace nada mas. He repasado el codigo y no encuentro el error. Vosotros veis algo?

Código:
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.protoype.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.protoype.fadeIn=function(){
	if(this.photo._alpha<100-this.fadeSpeed){
		this.photo._alpha+=this.fadeSpeed;
	}else{
		this.photo._alpha=100;
		this.onEnterFrame=null;
	}
};
Gracias!!