# Video play list XML help

**URL:** https://forum.kirupa.com/t/video-play-list-xml-help/309420
**Category:** Uncategorized
**Created:** [May 14, 2010, 2:36pm UTC](https://forum.kirupa.com/t/video-play-list-xml-help/309420 "2010-05-14T14:36:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Navarone](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Navarone](https://forum.kirupa.com/u/Navarone)
#### Post date: [May 14, 2010, 2:36pm UTC](https://forum.kirupa.com/t/video-play-list-xml-help/309420/1 "2010-05-14T14:36:18Z")

</div>

I am trying to generate a play list from my XML file. In the function videoList produces a list of url for specified node, the trace(vidSource) shows:[COLOR=#984806][FONT=&quot][U]

Top level: Our Services  
[http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=72](http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=72)  
[http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=71](http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=71)  
[http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=74](http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=74)  
[http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=74](http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=74)  
[http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=73](http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=73)

[/U][/FONT][/COLOR]  
How can I loop thru these urls and pass them into my stream\_ns.play(vidSource); ?

```auto

function videoList(categoryName:String, loadUrls:XMLList):void {
    //trace(categoryName); 
    if (categoryName=="Our Services") {
        trace("Top level:", categoryName);
        for (var i:int = 0; i < loadUrls.length(); i++) {
            //trace(loadUrls*);//vidSource URL's
            vidSource=loadUrls*;
            trace(vidSource);                                    
        }
    }
}

function playVideos(vidSource):void {    
//trace(vidSource);
    for (var i:Number = vidSource.length(); i>0; i--) {                    
        //trace(vidSource);
        stream_ns.play(vidSource);
    }
}

// Set the function for what happens when that button gets clicked
function clipClick(e:Event):void {
    outText.text=e.target.clickToPage;
    //trace(e.target.clickToPage);
    if (e.target.clickToPage=="Our Services") {
        //vidSource="http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=72";
        //play video list
        playVideos(vidSource);        
        container.visible=true;
    }
}

```
