# I am going Blind... I purchase this FLV Player and I need help

**URL:** <https://forum.kirupa.com/t/i-am-going-blind-i-purchase-this-flv-player-and-i-need-help/195235>\
**Category:** Uncategorized\
**Created:** [July 30, 2006, 12:21am UTC](https://forum.kirupa.com/t/i-am-going-blind-i-purchase-this-flv-player-and-i-need-help/195235 "2006-07-30T00:21:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hogfish](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@hogfish](https://forum.kirupa.com/u/hogfish)\
**Post date:** [July 30, 2006, 12:21am UTC](https://forum.kirupa.com/t/i-am-going-blind-i-purchase-this-flv-player-and-i-need-help/195235/1 "2006-07-30T00:21:07Z")

</div>

Guy’s I purchased this FLV Player component from [www.proxus.com](http://www.proxus.com) only to realize it does not have the XML List component with it. I don’t want to spend $50.00 buck getting the right component… can any one help me with this.

I want to add a list box and have that list box populate via xml. I don’t want to hard code the FLV path in the actual player I want it be in my xml file. I have started it somewhat but I am lost.

Can anyone help me please…I am uploading file - you can use it for free just please help me thank you…

Here is the Actionscript:

//Set up the list box, call function VideoThumb to create the actual thumbnails

list.rowHeight = 45;  
list.cellRenderer = “VideoThumb”;  
list.selectable = true;

//create new empty listener object  
listListener = {};

//Function to handle what happens when an item in the list is selected  
listListener.change = function( evtobj ) {  
var nav = list.dataProvider[list.selectedIndex];  
nc = new NetConnection(); //create a connection  
nc.connect( null ); //null connection for progressive download  
ns = new NetStream(nc); //create a stream  
video.attachVideo(ns); //pipe stream to this video object  
// walk through the chosen item, build and play it  
var reset = true;  
for ( var i = 0; i \< nav.childNodes.length; i++ ) {  
var stream = nav.childNodes\*;  
if ( stream.nodeName == “stream” ) {  
// build path to flv, and play it  
myStreamPath = nav.attributes.url + “/” + stream.attributes.name;  
ns.setBufferTime(10);  
ns.play( myStreamPath);  
reset = false;

```
    }
}

```

}  
//

//  
//Add an event listener on the list, when it triggers, run the listListener function to repopulate the list  
list.addEventListener(“change”, listListener);

//Function that loads the XML file, parses it, and builds the list of available video clips  
var xmllist = new XML(); //setup a variable to hold the XML  
xmllist.ignoreWhite = true;  
xmllist.load( “videos.xml” ); //load the XML file  
//The following gets called when the XML has been loaded  
xmllist.onLoad = function( status ) {  
if ( !status )  
trace( status );  
var entries = this.childNodes[0];  
var playlists = {};  
var nav = [];  
for ( var i = 0; i \< entries.childNodes.length; i++ ) {  
var entry = entries.childNodes\*;  
if ( entry.nodeName == “listitem” )  
//builds array of video clip names  
playlists[entry.attributes.name] = entry;  
else if ( entry.nodeName == “menu” ) {  
//builds array of available videos  
for ( var j = 0; j \< entry.childNodes.length; j++ )  
nav[j] = playlists[entry.childNodes[j].attributes.name];  
} //end else if  
} //end if

```
    //sends the array of videos to the listbox UI
    list.dataProvider = nav;
} //end xmllist.onload

```

//resizes the video object to the width and height of the clip  
function onVideoResize() {  
if ( video.width != video.\_width || video.height != video.\_height ) {  
video.\_width = video.width;  
video.\_height = video.height;  
//center video in playback area  
newx = (335.0 - video.\_width)/2;  
newy = (279.0 - video.\_height)/2;  
video.\_x = newx;  
video.\_y = newy;  
}  
}

list.setStyle(“borderStyle”,none);  
list.setStyle(“selectionColor”,0xCCCCCC);  
list.setStyle(“textSelectedColor”,0x000000);  
list.setStyle(“rollOverColor”,0xCCCCCC);  
setInterval( onVideoResize, 200 ); //keeps checking video size
