XML slideshow w/ intro SWF

I’ve followed Kirupa’s tutorial on XML slideshow and modified it to incorporate another swf. The first swf is an intro animation that then stops and loads another swf which is the actual slideshow piece. The problem is that the first image keeps repeating. I’ve looked all over the forums for a solution and I think the problem is in the code. If I tested the slideshow.swf on its own, it works perfectly. What am I doing wrong?

header.swf:

[COLOR=royalblue]stop[/COLOR]();
[COLOR=royalblue]var[/COLOR] l = [COLOR=royalblue]new Loader[/COLOR]();
[COLOR=royalblue]addChild[/COLOR](l);
l.[COLOR=royalblue]load[/COLOR]([COLOR=royalblue]new URLRequest[/COLOR]([COLOR=seagreen]"slideshow.swf"[/COLOR]));

slideshow.swf:


delay = 3000;
//-----------------------
[COLOR=royalblue]function[/COLOR] loadXML(loaded) {
    [COLOR=royalblue]if[/COLOR] (loaded) {
        xmlNode = [COLOR=royalblue]this.firstChild[/COLOR];
        image = [];
        link = [];
        total = xmlNode.[COLOR=royalblue]childNodes.length[/COLOR];
        [COLOR=royalblue]for[/COLOR] (i=0; i<total; i++) {
            image* = xmlNode.[COLOR=royalblue]childNodes[/COLOR]*[COLOR=royalblue].[/COLOR][COLOR=royalblue]childNodes[/COLOR][0][COLOR=royalblue].[/COLOR][COLOR=royalblue]firstChild.nodeValue[/COLOR];
            link* = xmlNode.[COLOR=royalblue]childNodes[/COLOR]*[COLOR=royalblue].[/COLOR][COLOR=royalblue]childNodes[/COLOR][1][COLOR=royalblue].firstChild.nodeValue[/COLOR];
        }
        firstImage();
        } [COLOR=royalblue]else[/COLOR] {
            [COLOR=royalblue]content[/COLOR] = "[COLOR=seagreen]xml file not loaded![/COLOR]";
        }
}
xmlData = [COLOR=royalblue]new XML[/COLOR]();
xmlData[COLOR=royalblue].ignoreWhite[/COLOR] = [COLOR=royalblue]true[/COLOR];
xmlData[COLOR=royalblue].onLoad[/COLOR] = loadXML;
xmlData[COLOR=royalblue].load[/COLOR]("[COLOR=seagreen]images.xml[/COLOR]");
p = 0;
[COLOR=royalblue]this.onEnterFrame[/COLOR] = [COLOR=royalblue]function[/COLOR]() {
    filesize = picture[COLOR=royalblue].getBytesTotal[/COLOR]();
    loaded = picture[COLOR=royalblue].getBytesLoaded[/COLOR]();
    preloader[COLOR=royalblue]._visible[/COLOR] = [COLOR=royalblue]false[/COLOR];
    [COLOR=royalblue]if[/COLOR] (loaded != filesize) {
        preloader.preload_bar[COLOR=royalblue]._xscale[/COLOR] = 100*loaded/filesize;
    } [COLOR=royalblue]else[/COLOR] {
        preloader[COLOR=royalblue]._visible[/COLOR] = [COLOR=royalblue]true[/COLOR];
        if (picture[COLOR=royalblue]._alpha[/COLOR]<100) {
            picture[COLOR=royalblue]._alpha[/COLOR] += 10;
        }
    }
    picture[COLOR=royalblue].onRelease[/COLOR] = [COLOR=royalblue]function[/COLOR]() {
        [COLOR=royalblue]getURL[/COLOR](link[p], "[COLOR=seagreen]_blank[/COLOR]");
    };
};
[COLOR=royalblue]function[/COLOR] nextImage() {
[COLOR=royalblue]if[/COLOR] (p<(total-1)) {
        p++;
        [COLOR=royalblue]if[/COLOR] (loaded == filesize) {
            picture[COLOR=royalblue]._alpha[/COLOR] = 0;
            picture[COLOR=royalblue].loadMovie[/COLOR](image[p], 1);
            slideshow();
        }
    }
}
[COLOR=royalblue]function[/COLOR] prevImage() {
[COLOR=royalblue]if[/COLOR] (p>0) {
        p--;
        picture[COLOR=royalblue]._alpha[/COLOR] = 0;
        picture[COLOR=royalblue].loadMovie[/COLOR](image[p], 1);
    }
}
[COLOR=royalblue]function[/COLOR] firstImage() {
    if (loaded == filesize) {
        picture[COLOR=royalblue]._alpha[/COLOR] = 0;
        picture[COLOR=royalblue].loadMovie[/COLOR](image[0], 1);
        slideshow();
    }
}
[COLOR=royalblue]function[/COLOR] slideshow() {
    myInterval = [COLOR=royalblue]setInterval[/COLOR](pause_slideshow, delay);
    [COLOR=royalblue]function[/COLOR] pause_slideshow() {
        [COLOR=royalblue]clearInterval[/COLOR](myInterval);
        [COLOR=royalblue]if[/COLOR] (p == (total-1)) {
            p = 0;
            firstImage();
        } [COLOR=royalblue]else[/COLOR] {
            nextImage();
        }
    }
}

images.xml:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
    <pic>
        <image>1.jpg</image>
  <link>http://www.google.com</link>
    </pic>
    <pic>
        <image>2.jpg</image>
  <link>http://www.google.com</link>
    </pic>
    <pic>
        <image>3.jpg</image>
  <link>http://www.google.com</link>
    </pic>
    <pic>
        <image>4.jpg</image>
  <link>http://www.google.com</link>
    </pic>
    <pic>
        <image>5.jpg</image>
  <link>http://www.google.com</link>
    </pic>
    <pic>
        <image>6.jpg</image>
  <link>http://www.google.com</link>
    </pic>
    <pic>
        <image>7.jpg</image>
  <link>http://www.google.com</link>
    </pic>
</images>