I’m can’t for the life of me figure out how to trace the “aspect” attribute I have setup in the xml document. I’ve been trying to get this to work on my own for hours and I’m sure its a VERY simple fix.
Here is the xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<videos>
<video url="Taxes.flv" desc="Taxes" aspect="169" />
</videos>
Here is the actionscript:
var vlist:XML = new XML();
vlist.ignoreWhite = true;
vlist.onLoad = function() {
var videos:Array = this.firstChild.childNodes;
for (i=0; i<videos.length; i++) {
videoList.addItem(videos*.attributes.desc,videos*.attributes.url,videos*.attributes.aspect);
}
};
var vidList:Object = new Object();
vidList.change = function() {
trace(videoList.getItemAt(videoList.selectedIndex).data);
my_ns.play(videoList.getItemAt(videoList.selectedIndex).data);
};
The trace statement as it is comes back with “Taxes.flv”. How do I trace the “aspect” attribute from that Array instead?
Thanks in advance!