De-lurking here. I have a little script I use for small photo displays that just run through an array of images, fading each one out as the next fades in.
If I try to increase the size of the array beyond 12 MC's (each one holds a single symbol = photo), instead of continuing the fadeIn/fadeOut, the transition just jumps to the next item in the array. I have tried all sorts of different symbols, and the result is that same: more than 12 MC's, and the fading fails. When the array has been run through, it starts again at the beginning, as it should, and the fading returns to normal until it hits p_thirteen, which jumps in, and after the delay, jumps again back to p_one. Any idea of what's going on here? TIA for your collective wisdom!
Here's the code:
import gs.TweenLite;
var pixArray:Array = [p_one, p_two, p_three, p_four, p_five, p_six, p_seven, p_eight, p_nine, p_ten, p_eleven, p_twelve, p_thirteen];
var pic:MovieClip;
var index:Number = 0;
doFadeIn(pixArray[0]);
function doFadeIn(mc:MovieClip):Void {
TweenLite.to(mc,5,{_alpha:100, onComplete:nextImage, onCompleteParams:[mc]});
}
function nextImage(mc:MovieClip) {
doFadeOut(mc);
index++;
if(index > pixArray.length - 1) {
index = 0;
}
doFadeIn(pixArray[index]);
}
function doFadeOut(mc:MovieClip):Void {
TweenLite.to(mc,3,{_alpha:0});