Dynamic XML Slideshow with mask effect

So I am trying to dynamically load images into this slideshow. I have 2 MC’s, one with an animated mask, one without. I am trying to load an image into the first MC, have the mask reveal it, then load that image into the 2nd MC which is behind this one. This way, when the next image loads and has the mask show it, the other image will still be on the stage behind the new one, and so forth.

Here is the excerpt of code from where the main actions are being done…

var myMCL:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myMCL.addListener(myListener);
var canMoveOn:Boolean;
p = 0;
myListener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
target_mc._alpha = 0;
preloader._visible = true;
preloader.preload_bar._xscale = 100*loadedBytes/totalBytes;
};

myListener.onLoadInit = function(target_mc) {
canMoveOn = true;
var otherPic:Number = Math.abs(pictureIndex-1);
target_mc.swapDepths(pictureArray[otherPic]);

preloader._visible = false;
desc_txt.text = description[p];
target_mc.onEnterFrame = function() {
    if (this._alpha<100) {
        this._alpha += 10;
    } else {
        delete this.onEnterFrame;
    }
};

};
var myInterval;
function nextImage() {
if (canMoveOn) {
canMoveOn = false;
p++;
p %= image.length;
pictureIndex = Math.abs(pictureIndex-1);
myMCL.loadClip(image[p],pictureArray[pictureIndex]);
picture_num();
clearInterval(myInterval);
maskLayer.gotoAndPlay(1);
aLink = link[p];
btnLink.onRelease = function () {
getURL(aLink, “_blank”);
}
if (playing) {
slideshow();
}
}
}
function prevImage() {
if (canMoveOn) {
canMoveOn = false;

    if (p>0) {
        p--;
    } else {
        p = image.length-1;
    }
    pictureIndex = Math.abs(pictureIndex-1);
    myMCL.loadClip(image[p],pictureArray[pictureIndex]);
    picture_num();
    clearInterval(myInterval);
    maskLayer.gotoAndPlay(1);
    aLink = link[p];
    btnLink.onRelease = function () {
        getURL(aLink, "_blank");
    }
    if (playing) {
        slideshow();
    }
}

}
function firstImage() {
canMoveOn = false;

myMCL.loadClip(image[p],pictureArray[pictureIndex]);
clearInterval(myInterval);
maskLayer.gotoAndPlay(1);
aLink = link[p];
btnLink.onRelease = function () {
    getURL(aLink, "_blank");
}
if (playing) {
    slideshow();
}

}
function picture_num() {
current_pos = p+1;
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
}

Any ideas or help would be greatly appreciated! If you need clearification, just let me know…

Also, I am pretty sure

target_mc.swapDepths(pictureArray[otherPic]);

is what is causing the issue.

Currently the slideshow ‘works’. But you can tell when the depths are swapped because it flashes white, then the new image begins loading. So, I am looking for a way to move the image to a new MC without the user being able to see the change.

Hope this helps… I can send .zip file to someone with email address, but it is too large to attach in this forum.