Bueno este codigo me sirve para cargar la imagen desde carpetas separaadas del flash, pero yo quiero cargarlos desde la biblioteca, cual seria el cambio que deboo hacer?
this.pathToPics="imagenes/";
this.pArray=["img1.png","img2.png","img3.png","img4.png"];
this.fadeSpeed=5;
this.pIndex=0;
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
muestras="Foto Nº"+(this.pIndex+1)+" " +this.pArray[0];
MovieClip.prototype.chagePhoto=function(d){
this.pIndex=(this.pIndex+d)%this.pArray.length;
if(this.pIndex<0){
this.pIndex+=this.pArray.length;}
this.onEnterFrmae=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]);
muestras="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==1){
this.onEnterFrame=fadeln;
}else{
trace(l/t);
}
};
MovieClip.prototype.fadeln=function(){
if(this.photo._alpha<100-this.fadeSpeed){
this.photo._alpha+=this.fadeSpeed;
}else{
this.photo._alpha=100;
this.onEnterFrame=null;
}
};
//Retroceder
on(release, keyPress "<Left>"){
this.changePhoto(-1);
}
//Avanzar
on(release, keyPress "<Rigth>"){
this.changePhoto(1);
}