Hello!
I’m trying to attach a new movie for each child node.
I’m trying to add a thumbnail, description and a link to a .flv that I can load to a movie player.
Here is the code:
var video_xml = new XML();
video_xml.load("video.xml");
video_xml.ignoreWhite = true;
video_xml.onLoad = function(success){
if(success){
thumb = [];
description = [];
clip = [];
xmlNode = this.firstChild;
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
thumb* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
clip* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
var xPos = 10;
var yPos = 10;
attachMovie("container", "new"+i, i, {_x:xPos, _y:yPos});
xPos += this["new"+i]._width+10;
this["new"+i].desc.text = description*;
this["new"+i].thumb.loadMovie(thumb*);
this["new"+i].clip = clip*;
}
}
}
When I preview the movie an empty container appears with none of the xml data.
Has anyone done this before? I must be missing something!
Hope someone can help me out!!!??!