Crossfading XML slideshow showing 3 pictures at once

I’ve been working with Scotty’s modified crossfading XML gallery code found here.
The end result is going to be a “photo-stack” with each image layered on top of one another, all cycling through the list of images. So container 1 would start of showing image 1, then image 2, and so on. Container 2 would start with image 2, then 3, and so on. One the container gets to it’s final image, it loops back to the first image.

I’ve duplicated all the necessary functions and duplicated all required variables with different names so there shouldn’t be any overlap, however when I run my SWF, only one of the galleries loads. If I try and load the galleries as external SWF’s, only one gallery appears.

Here is my actionscript code:

var id, current;
var k = 0, p = 0;
var slide = 1;

var id2, current2;
var k2 = 0, p2 = 0;
var slide2 = 1;

function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        description = [];
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
            description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
        }
        id = setInterval(preloadPic, 100);
        id2 = setInterval(preloadPic2, 100);

    } else {
        content = "file not loaded!";
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");

function preloadPic() {
    clearInterval(id);
    var con = picture.duplicateMovieClip("con"+k, 9984+k);
    con.loadMovie(image[p]);
    preloader._visible = 1;
    preloader.swapDepths(con.getDepth()+3);
    con._alpha = 0;
    var temp = _root.createEmptyMovieClip("temp"+k, 99+k);
    k++;
    temp.onEnterFrame = function() {
        var total = con.getBytesTotal();
        var loaded = con.getBytesLoaded();
        percent = Math.round(loaded/total*100);
        preloader.preload_bar._xscale = percent;
        if (con._width) {
            preloader._visible = 0;
            con.onEnterFrame = fadeIn;
            if (slide) {
                id = setInterval(nextImage, 5000);
            }
            delete this.onEnterFrame;
        }
    };
}

function preloadPic2() {
    clearInterval(id2);
    var con2 = picture2.duplicateMovieClip("con2"+k2, 9984+k2);
    con2.loadMovie(image[p2]);
    preloader2._visible = 1;
    preloader2.swapDepths(con2.getDepth()+3);
    con2._alpha = 0;
    var temp2 = _root.createEmptyMovieClip("temp2"+k2, 99+k2);
    k2++;
    temp2.onEnterFrame = function() {
        var total2 = con2.getBytesTotal();
        var loaded2 = con2.getBytesLoaded();
        percent2 = Math.round(loaded2/total2*100);
        preloader2.preload_bar._xscale = percent2;
        if (con2._width) {
            preloader2._visible = 0;
            con2.onEnterFrame = fadeIn2;
            if (slide2) {
                id2 = setInterval(nextImage2, 4000, "intervalimage2");
            }
            delete this.onEnterFrame;
        }
    };
}
MovieClip.prototype.fadeIn = function() {
    if (this._alpha<100) {
        current._alpha -= 10;
        this._alpha += 10;
    } else {
        current._visible = 0;
        current = this;
        delete this.onEnterFrame;
    }
};

MovieClip.prototype.fadeIn2 = function() {
    if (this._alpha<100) {
        current2._alpha -= 10;
        this._alpha += 10;
    } else {
        current2._visible = 0;
        current2 = this;
        delete this.onEnterFrame;
    }
};



function nextImage() {
    p<total-1 ? p++ : p=0;
    desc_txt.text = description[p];
    preloadPic();
}
function nextImage2() {
    p2<total-1 ? p2++ : p2=0;
    preloadPic2();
}


preloadPic();
preloadPic2();

I’m open to any suggestions or assistance on how to make this work. Thank you for your help.