Ok, I’m at my wit’s end, having spent 4 hrs trying to figure out what I’m doing wrong. I’m creating a flash piece with multiple xml slideshow with audio narration. So I’m trying to recreate my xml file to accomodate the audio piece but when I do a trace on flash it’s calling two of the same URL’s from the image element instead of two different ones. [color=black]Here’s my XML example.[/color]
<images>
<audio clip="one">
<image caption="first caption">images/image1.jpg</image>
<image caption="second caption">images/image2.jpg</image>
<image caption="third caption">images/image3.jpg</image>
</audio>
<audio clip="two">
<image caption="first caption">images/image1.jpg</image>
<image caption="second caption">images/image2.jpg</image>
<image caption="third caption">images/image3.jpg</image>
</audio>
</images>
And here’s the call from Flash:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild.childNodes;
audioNum = this.firstChild.firstChild.attributes.clip;
//image = this.firstChild.firstChild.childNodes[0].firstChild.nodeValue;
image = [];
credit = [];
total = xmlNode.length;
totalImg = this.firstChild.firstChild.childNodes.length;
proj = xmlNode.attributes.title;
for (i=0; i<totalImg; i++) {
image* = xmlNode*.childNodes[0].firstChild.nodeValue;
credit* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
trace (image);
}
id = setInterval(preloadPic, 100);
project.loadMovie(proj);
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("myown.xml");
Would truly appreciate it if you can let me know the errors on my code. Thanks!