The code in red below is loading the url from the XML and not the vidlink. Any ideas on how to get it to load the vidlink in the browser?
Here is the XML
<?xml version=“1.0” encoding=“ISO-8859-1” ?>
<videos>
<video desc=“Beyond Kitckens” url=“Video_Slide8.flv” vidlink=“http://www.yahoo.com” />
<video desc=“AEI” url=“AEIVideoProfile_0108.flv” vidlink=“http://www.yahoo.com” />
</videos>
Here is the ActionScript
// xml playlist
// create an XMl object
var vidList:XML = new XML();
// ignore white spaces
vidList.ignoreWhite = true;
vidList.onLoad = function() {
// put the nodes of xml into array
var videoArray:Array = this.firstChild.childNodes;
// iterate through video array
// and add videos to the listbox
for (var i = 0; i<videoArray.length; i++) {
videoList.addItem(videoArray*.attributes.desc, videoArray*.attributes.url, videoArray*.attributes.vidlink);
}
ns.pause();
};
// create a listener that responds
// to changes in the listbox
var vidListener:Object = new Object();
vidListener.change = function() {
// play the item selected in listbox
ns.play(videoList.getItemAt(videoList.selectedIndex).data);
_root.weburl.html = true;
[COLOR=“Red”]_root.weburl.htmlText="<a href=""+videoList.getItemAt(videoList.selectedIndex).data+"" target="_self">“Click for Website”</a>"[/COLOR]
};
// register the event listener to listbox
videoList.addEventListener(“change”, vidListener);
// load xml file
vidList.load(“videos.xml”);