Picture slide show bug

Hello,

I am loading pictures using xml but I need to load images in 2 different places and I cant seem to get this to work. It will only load one of the picture movieclips - the one with the actionscript that was put in last. (hopefully that makes sense)

The way I am doing this is by using a blank movieclip and then putting in actionscript that references an xml which tells it where all of the images are. So I have 2 different blank movieclips with 2 sets of actionscript referencing 2 different xml documents.

All of my things seem to be named correctly because I can get the movieclips to independantly load but when I put it together on the same page only the one with the latest actionscript loads.

I’ve tried putting the actionscript on different layers and on the same layer.

Could you help me on this?

Here is my actioscript:

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; 
} 
firstImage(); 
} else { 
content = "file not loaded!"; 
} 
} 
xmlData = new XML(); 
xmlData.ignoreWhite = true; 
xmlData.onLoad = loadXML; 
xmlData.load("images01.xml");
xmlData.load("images02.xml");
///////////////////////////////////// 
listen = new Object(); 
listen.onKeyDown = function() { 
if (Key.getCode() == Key.LEFT) { 
prevImage(); 
} else if (Key.getCode() == Key.RIGHT) { 
nextImage(); 
} 
}; 
Key.addListener(listen); 
previous_btn.onRelease = function() { 
prevImage(); 
}; 
the_btn.onRelease = function() { 
nextImage(); 
}; 
///////////////////////////////////// THIS IS MC1 CALLED picture
p = 0; 
this.onEnterFrame = function() { 
filesize = picture.getBytesTotal(); 
loaded = picture.getBytesLoaded(); 
preloader._visible = true; 
if (loaded != filesize) { 
preloader.preload_bar._xscale = 100*loaded/filesize; 
} else { 
preloader._visible = false; 
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); 
desc_txt.text = description[p]; 
picture_num(); 
} 
} 
} 
function prevImage() { 
if (p>0) { 
p--; 
picture._alpha = 0; 
picture.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
picture_num(); 
} 
} 
function firstImage() { 
if (loaded == filesize) { 
picture._alpha = 0; 
picture.loadMovie(image[0], 1); 
desc_txt.text = description[0]; 
picture_num(); 
} 
} 
function picture_num() { 
current_pos = p+1; 
pos_txt.text = current_pos+" / "+total; 
}
///////////////////////////////////// THIS IS THE START OF MC2 CALLED pictureB
p = 0; 
this.onEnterFrame = function() { 
filesize = pictureB.getBytesTotal(); 
loaded = pictureB.getBytesLoaded(); 
preloader._visible = true; 
if (loaded != filesize) { 
preloader.preload_bar._xscale = 100*loaded/filesize; 
} else { 
preloader._visible = false; 
if (pictureB._alpha<100) { 
pictureB._alpha += 10; 
} 
} 
}; 
function nextImage() { 
if (p<(total-1)) { 
p++; 
if (loaded == filesize) { 
pictureB._alpha = 0; 
pictureB.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
pictureB_num(); 
} 
} 
} 
function prevImage() { 
if (p>0) { 
p--; 
pictureB._alpha = 0; 
pictureB.loadMovie(image[p], 1); 
desc_txt.text = description[p]; 
pictureB_num(); 
} 
} 
function firstImage() { 
if (loaded == filesize) { 
pictureB._alpha = 0; 
pictureB.loadMovie(image[0], 1); 
desc_txt.text = description[0]; 
pictureB_num(); 
} 
} 
function pictureB_num() { 
current_pos = p+1; 
pos_txt.text = current_pos+" / "+total; 
}