I cant find the issue with this slideshow

:td: this is stupid! lol I have this slideshow, that blends, works beautifully right up until the 23rd transition then all hell breaks loose!! not sure where the issue is:

This is just a prototype to get the trans perfect, here’s my code


n = -1;
i = 0;
d = 9999999999;
secondDelay = (seconds=2)*30;
ims = new Array("pic1", "pic2", "pic3");
function swap() {
 this.attachMovie(ims[n], "Pic"+(++i), d--, {_alpha:0, timeOut:secondDelay, onEnterFrame:fadeIn});
}
function cng() {
 n<ims.length-1 ? n++ : (n=-1, cng(), swap());
 trace(ims[n]);
}
function fadeIn() {
 this._alpha<100 ? this._alpha++ : (delete this.onEnterFrame, this.onEnterFrame=countDown);
}
function countDown() {
 this.timeOut>0 ? this.timeOut-- : (delete this.onEnterFrame, this.onEnterFrame=fadeOut, cng(), swap());
}
function fadeOut() {
 this._alpha>1 ? this._alpha-- : this.removeMovieClip();
}
cng(), swap();