# Flash FLV Player with XML problem

**URL:** https://forum.kirupa.com/t/flash-flv-player-with-xml-problem/279427
**Category:** flash
**Created:** [January 14, 2009, 5:15pm UTC](https://forum.kirupa.com/t/flash-flv-player-with-xml-problem/279427 "2009-01-14T17:15:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Rocketrud](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@Rocketrud](https://forum.kirupa.com/u/Rocketrud)
#### Post date: [January 14, 2009, 5:15pm UTC](https://forum.kirupa.com/t/flash-flv-player-with-xml-problem/279427/1 "2009-01-14T17:15:36Z")

</div>

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](http://www.yahoo.com)” /\>  
\<video desc=“AEI” url=“AEIVideoProfile\_0108.flv” vidlink=“[http://www.yahoo.com](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”);
