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="][U]
Top level: Our Services
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=74
http://pegasus.dev.webriverinteractive.com/API/Resource.ashx?ResourceID=74
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); ?
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;
}
}