XML Photo Gallery - captions not working, but photos and sound files are (?)

I’m using Flash CS3. Using a combination of Kirupa’s Photo Gallery tutorial (http://kirupa.com/developer/mx2004/x…otogallery.htm), input from these forums (fabulous karma to the fellow who posted with the actionscript for adding sound), and Jacob Rutter’s site (http://onerutter.com/flashxml-slideshow-tutorial/), I’ve made a photo gallery much like the one in the Kirupa tutorial, except that I don’t need or want the preloader to show, I don’t need or want the counter, and I’ve added sound.

The images, buttons, and sound files are all working like a charm. Only one thing isn’t working: the captions. Right now my dynamic textfield holds the word “text” in a certain font and size; when I run the photo gallery “text” is still there in the proper spot, looking lovely. The problem is, I don’t want the word “text” as my caption for any of the photos. (This is somewhat odd; the image and sound files are accessed from the same XML file as the captions, so it’s hard to see why just the captions would not be working.)

I’ve been searching these forums and site for hours now (as well as going over and over the tutorial), but none of the solutions proposed there for caption problems have worked.

Here’s my actionscript:


function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
audio = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
audio* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
}
firstImage();
} else {
content = “file not loaded!”;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(“infant_images.xml”);
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.SPACE) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = false;
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];
sound = new Sound();
sound.loadSound(audio[p],true)
}
}
}
function prevImage() {
if (p>0) {
p–;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
sound = new Sound();
sound.loadSound(audio[p],true);
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
sound = new Sound();
sound.loadSound(audio[0],true)
}
}
function loadSound() {
if (loaded == filesize) {
createEmptyMovieClip(“sound_mc”,2);
sound_mc.sound_obj = new Sound();
sound_mc.sound_obj.loadSound( sound[p], true);
sound_mc.sound_obj.play();
}
}


Here are a few snippets from my XML file:


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

<pic>
<image>http://www.URL.com/.../apple.jpg</image>
<caption>apple</caption>
<audio>http://www.URL.com/.../apple.mp3</audio>
</pic>

<pic>
<image>http://www.URL.com/.../baby.jpg</image>
<caption>baby</caption>
<audio>http://www.URL.com/.../baby.mp3</audio>
</pic>

</images>


(Forgive the URL substitution; I don’t want this company’s name turning up all over Google in quite this light. In the real XML file the URL lines are full and correct.)

Can someone help me? I posted about this last Thursday in the Flash section of the forums but have not received any replies. Thank you so much!!