Hello all,
I am using a variation on the resizing gallery. Great code and I’m sure many of you are familiar with it.
Everything is working great but I do have a question. Most of my XML contains a comment for the corresponding image. When I don’t have a comment (ie null), I’d like to have the text line not display anything. I’ve had some problems figuring out the best way to do this. Here’s my XML code:
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success) {
if (success) {
xmlNode = this.firstChild;
total = xmlNode.childNodes.length;
var gallery = this.firstChild;
for (var i = 0; i<gallery.childNodes.length; i++) {
tArray.push(gallery.childNodes*.childNodes[3].firstChild.nodeValue); pArray.push("photos/"+gallery.childNodes*.childNodes[0].firstChild.nodeValue);
}
containerMC.loadPic(0);
} else {
title_txt.text = "Error!";
}
};
I’ve tried working with variations on picinfo.info.text = tArray[pic]; and some basic if statements, but with no luck. Any help appreciated, thanks!