I’ve been trying to reset my rotateImage function if it hits 5_mc in the array
I have the array items with actionscript linkage to 1,2,3,4,5
Any ideas on how to do this?
Thanks,
Saveth
// NUMBER OF BANNERS
var countbanners = 5;
// DEFINE BANNER ARRAY
filenamebanners = ["1_mc", "2_mc", "3_mc", "4_mc", "5_mc"];
// GET RANDOM BANNER
for (i=0; i<countbanners; i++) {
s = filenamebanners.length;
k = Math.floor(Math.random()*s);
holder_mc.attachMovie([k], banner[k]+i, getNextHighestDepth());
}
// FADE IN IMAGE
this.onEnterFrame = function() {
if (holder_mc._alpha<100) {
holder_mc._alpha += 10;
}
};
rotateInterval = setInterval(rotateImage, 4000);
// ROTATE IMAGES
function rotateImage() {
holder_mc._alpha = 0;
holder_mc.attachMovie([k++], banner[k++]+i, getNextHighestDepth());
}