Kirupas XML Photogallery - Picture description

I´m using Kirupas XML Photogallery tutorial to make a portfolio, and what i want to do is add an extra textfield which gets an imagedescription from the XML file. How would I go about that?

I don’t understand how the “caption” tag winds up in the “desc_txt” textfield.

Here is the FLA code:

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;
description2* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
}
firstImage();
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“gallery/xml/yara.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;
_root.content4.onEnterFrame = function() {
filesize = _root.content4.picture.getBytesTotal();
loaded = _root.content4.picture.getBytesLoaded();
_root.content4.preloader._visible = true;
if (loaded != filesize) {
_root.content4.preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
_root.content4.preloader._visible = false;
if (_root.content4.picture._alpha<100) {
_root.content4.picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
_root.content4.picture._alpha = 0;
_root.content4.picture.loadMovie(image[p], 1);
_root.content4.desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p–;
_root.content4.picture._alpha = 0;
_root.content4.picture.loadMovie(image[p], 1);
_root.content4.desc_txt.text = description[p];
_root.content4.desc2_txt.text = description2[p];
picture_num();
}
}

function firstImage() {
if (loaded == filesize) {
p = 0;//reset it back to 0
_root.content4.picture._alpha = 0;
_root.content4.picture.loadMovie(image[0], 1);
_root.content4.desc_txt.text = description[0];
picture_num();
}
}

function picture_num() {
current_pos = p+1;
_root.content4.pos_txt.text = current_pos+" / "+total;
}

The XML:

<?xml version=“1.0” encoding=“utf-8” standalone=“yes”?>

<images>

&lt;pic&gt;

    &lt;image&gt;http://www.1234.no/1234567/gallery/bilder/yara_grasaat.jpg&lt;/image&gt;

    &lt;caption&gt;Yara Formates&lt;/caption&gt;

&lt;/pic&gt;

</images>

Any help appreciated!

Stein