Want to load 2 images in the xml flash slideshow

Hi there

I have the following tutorial

it loads the images and text from xml. I need this to load in two images simultaneously, 1 picture and 2 the color bar over it… becuase each slide needs to have its own color.

I added a node in the xml file shown in red here.

<?xml version=“1.0” encoding=“utf-8” standalone=“yes”?>
<images>
<pic>
[COLOR=“Black”]<image>images/image1.jpg</image>
<caption>One</caption>
[COLOR=“black”][COLOR=“Red”]<labels>images/a.png</labels>[/COLOR][/COLOR]
[COLOR=“Black”][COLOR=“Red”][COLOR=“black”]<link>http://www.yahoo.com[/COLOR]</link>[/COLOR][/COLOR]
</pic>
[/COLOR] <pic>
<image>images/image2.jpg</image>
<caption>Two</caption>
[COLOR=“red”]<labels>images/b.png</labels>[/COLOR]
<link>http://www.google.com</link>
</pic>

    &lt;/images&gt;

In the Action script i added the instance of the color bar like so. shown in red … and added a lyer in flash with a movie clip with instance name color. It works for the first skide but in the next or previous the second omage of color bar doesnt get loaded.

Please help…

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
[COLOR=“Red”]labels = [];[/COLOR]
//
//define link variable
//
link = [];
//
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
[COLOR=“red”]labels* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
[/COLOR] //
//adding links
//
link* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
//
}
firstImage();
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“image_and_link.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();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
filesize = color.getBytesTotal();
loaded = picture.getBytesLoaded();
loaded = color.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;
}
[COLOR=“Red”]if (color._alpha<100) {
[COLOR=“red”]color._alpha += 10;
[/COLOR] }
[/COLOR] }
//
//getURL statement
//
picture.onRelease = function() {
getURL(link[p], “_blank”);
};
//
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
[COLOR=“Red”]color._alpha = 0;
color.loadMovie(image[p], 2);
[/COLOR] picture_num();
}
}
}
function prevImage() {
if (p>0) {
p–;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
[COLOR=“Red”]color._alpha = 0;
color.loadMovie(image[p], 1);
[/COLOR] picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
[COLOR=“Red”]color._alpha = 0;
color.loadMovie(labels[0], 1);[/COLOR]
desc_txt.text = description[0];
picture_num();
}
}