Gracias
Código :
function showNext() {
depth++;
clone = cage.attachMovie("imagemc", "imagemc"+depth, depth);
cage["imagemc"+(depth-10)].removeMovieClip();
curimg++;
if (curimg>images.length-1) {
curimg = 0;
}
preload(images[curimg], clone);
trace("curimg = "+curimg);
}
function preload(file, clip) {
loadMovie(path+file, clip.cage);
clip.onEnterFrame = function() {
tkb = this.cage.getBytesTotal();
lkb = this.cage.getBytesLoaded();
p = Math.round(lkb/tkb*100);
if (isNaN(p)) {
p = 0;
}
if (p>0) {
percentage = p;
}
if (lkb == tkb && p>99) {
percentage = "";
this.maskmc.dotween();
if (autoplaymc._currentframe == 2) {
clearInterval(autoID);
autoID = setInterval(showNext, delay);
}
delete this["onEnterFrame"];
}
};
}
function autoPlay() {
autoID = setInterval(showNext, delay);
showNext();
autoplaymc.gotoAndStop(2);
}
images = [];
images[0] = "serveis/img1.jpg";
images[1] = "serveis/img2.jpg";
images[2] = "serveis/img3.jpg";
images[3] = "serveis/img4.jpg";
images[4] = "serveis/img5.jpg";
images[5] = "serveis/img6.jpg";
images[6] = "serveis/img7.jpg";*/
curimg = -1;
depth = 100;
delay = 5000;
autoPlay();
