# Need Help Please.. Looping FLV videos

**URL:** <https://forum.kirupa.com/t/need-help-please-looping-flv-videos/209643>\
**Category:** Uncategorized\
**Created:** [December 11, 2006, 4:00am UTC](https://forum.kirupa.com/t/need-help-please-looping-flv-videos/209643 "2006-12-11T04:00:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![santhoshdotcom](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@santhoshdotcom](https://forum.kirupa.com/u/santhoshdotcom)\
**Post date:** [December 11, 2006, 4:00am UTC](https://forum.kirupa.com/t/need-help-please-looping-flv-videos/209643/1 "2006-12-11T04:00:54Z")

</div>

I created a video player that plays flv video from xml file. Problem is after the first clip video stops. I need to auto play the next .flv video from the xml file. Some one please help me.  
Here is the code…

stop();  
var nc:NetConnection = new NetConnection();  
nc.connect(null);  
var ns:NetStream = new NetStream(nc);

ns.setBufferTime(25);  
ns.onStatus = function(info){  
if (info.code == “NetStream.Buffer.Full”){  
bufferClip.\_visible=false;  
}  
if (info.code == “NetStream.Buffer.Empty”){  
bufferClip.\_visible=true;  
}  
if (info.code == “NetStream.Play.Stop”){  
ns.seek(0);  
}  
}

theVideo.attachVideo(ns);  
var vlist:XML =new XML();  
vlist.ignoreWhite = true;  
vlist.onLoad = function() {  
var videos:Array = this.firstChild.childNodes;  
for (i=0;i\<videos.length;i++){  
videoList.addItem(videos\*.attributes.desc,videos\*.attributes.url);  
}

ns.play(videoList.getItemAt(0).data);  
videoList.selectedIndex = 0;  
}  
var vidList:Object = new Object();  
vidList.change = function() {  
ns.play(videoList.getItemAt(videoList.selectedIndex).data);  
}  
videoList.addEventListener(“change”,vidList);  
vlist.load(“videos.xml”);
