Multiple slideshows

I have two empty movie clips, one called picture and the other picture 2 to hold the images for the slideshow, the code for picture is as below:

delay = 3000;
//-----------------------
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;

}
firstImage();

} else {

content = “file not loaded!”;

}

}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“channel2.xml”);

p = 0;
this.onEnterFrame = function() {

filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();

if (picture._alpha<100) {

picture._alpha += 10;

}

};
function nextImage() {

if (p<(total-1)) {

p++;
if (loaded == filesize) {

picture._alpha = 0;
picture.loadMovie(image[p], 1);
picture_num();
slideshow();

}

}

}

function firstImage() {

if (loaded == filesize) {

picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
slideshow();

}

}

function slideshow() {

myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {

clearInterval(myInterval);
if (p == (total-1)) {

p = 0;
firstImage();

} else {

nextImage();

}

}

}

the code for picture2 is below:

delay2 = 3000;
//-----------------------
function loadXML2(loaded2) {

if (loaded2) {

xmlNode2 = this.firstChild;
image2 = [];
total2 = xmlNode2.childNodes.length;
for (i=0; i<total2; i++) {

image2* = xmlNode2.childNodes*.childNodes[0].firstChild.nodeValue;

}

firstImage2();

} else {

content = “file not loaded!”;

}

}

xmlData2 = new XML();
xmlData2.ignoreWhite = true;
xmlData2.onLoad = loadXML2;
xmlData2.load(“channel3.xml”);

p2 = 0;

this.onEnterFrame = function() {

filesize2 = picture2.getBytesTotal();
loaded2 = picture2.getBytesLoaded();

if (picture2._alpha<100) {

picture2._alpha += 10;

}

};

function nextImage2() {

if (p2<(total2-1)) {

p2++;
if (loaded2 == filesize2) {

picture2._alpha = 0;
picture2.loadMovie(image2[p2], 1);
slideshow2();

}

}

}

function firstImage2() {

if (loaded2 == filesize2) {

picture2._alpha = 0;
picture2.loadMovie(image2[0], 1);
slideshow2();

}

}

function slideshow2() {

myInterval2 = setInterval(pause_slideshow2, delay2);
function pause_slideshow2() {

clearInterval(myInterval2);
if (p2 == (total2-1)) {

p2 = 0;
firstImage2();

} else {

nextImage2();

}

}

}

i’m still unable to detect what I have done wrong and the two slideshows can’t play simultaneously, but both works fine individually.