Loop a XML Thumbnail Pane

I am having a very hard time figuring out how to get my video player playlist (scrolling thumbnail pane) to loop the thumbnails so that it never ends. The thumbnails are loaded dynamically through XML.

Any help is greatly appreciated!

Here is my code:

[FONT=Courier New]var nc:NetConnection = new NetConnection();
nc.connect(null);
var titleURL:Array = new Array; // make new title Array

var ns:NetStream = new NetStream(nc);
startScreen._visible = false;
ns.setBufferTime(30);

//Buffer/Start Screen
var firstPlay:Boolean = true;
ns.onStatus = function(info) {
   if (info.code == "NetStream.Buffer.Full") {
      bufferClip._visible = false;
      if (firstPlay) {
         ns.pause();
         startScreen._visible = true;
         firstPlay = false;
      }
   }
   if (info.code == "NetStream.Buffer.Empty") {
      bufferClip._visible = true;
   }
   if (info.code == "NetStream.Play.Stop") {
      v = whoIsOn+1;
      if (v>=listClips.length) {
         v = 0;
      }
      getNewVid(listClips[v]);
      if (info.code == "NetStream.Buffer.Empty")
      {
         bufferClip._visible = true;
      }
      ns.seek(0);
      ns.pause();
      startScreen._visible = true;
   }
};

theVideo.attachVideo(ns);

//Buttons

startScreen.startButton.onRelease = function() {
   ns.pause();
   startScreen._visible = false;
};

rewindButton.onRelease = function() {
   ns.seek(0);
};

function pauseIt():Void {
   pos = ns.position;
   ns.pause();
}

function unPauseIt():Void {
   ns.pause();
}



playPause.onRollOver = function() {
   if (this._currentframe == 1) {
      this.gotoAndStop('pauseOver');
   } else {
      this.gotoAndStop('playOver');
   }
};

playPause.onRollOut = playPause.onReleaseOutside = function(){;
if(this._currentframe== 10) this.gotoAndStop('pause');
else this.gotoAndStop('play');
};

playPause.onRelease = function() {
if (this._currentframe == 10) {
   this.gotoAndStop('playOver');
   this._parent.pauseIt();
} else {
   this.gotoAndStop('pauseOver');
   this._parent.unPauseIt();
}
};


//Loader Bar
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded:Number;

ns["onMetaData"] = function (obj) {
   duration = obj.duration;
};

function videoStatus() {
amountLoaded = ns.bytesLoaded/ns.bytesTotal;
loader.loadbar._width = amountLoaded*152.4;
loader.scrub._x = ns.time/duration*152.4;
}

//Scrubber
var scrubInterval;

loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
this.startDrag(scrub,false,this._y,151.3,this._y,1.1);
};

loader.scrub.onRelease = loader.scrub.onReleaseOutside=function () {
   clearInterval(scrubInterval);
   videoInterval = setInterval(videoStatus, 100);
   this.stopDrag();
};

//Mute Button
_root.createEmptyMovieClip("vSound",_root.getNextHighestDepth());
vSound.attachAudio(ns);

var so:Sound = new Sound(vSound);

so.setVolume(100);

mute.onRollOver = function()
{
   if(so.getVolume() == 100) 
   {
      this.gotoAndStop("onOver");
   }
   else
   {
      this.gotoAndStop("muteOver");
   }
}

mute.onRollOut = function()
{
   if(so.getVolume() == 100) 
   {
      this.gotoAndStop("on");
   }
   else
   {
      this.gotoAndStop("mute");
   }
}

mute.onRelease = function()
{
   if(so.getVolume() == 100) 
   {
      so.setVolume(0);
      this.gotoAndStop("muteOver");
   }
   else
   {
      so.setVolume(100);
      this.gotoAndStop("onOver");
   }
}



function scrubit() {
ns.seek(Math.floor((loader.scrub._x/151.3)*duration));
}


var vlist:XML = new XML();
vlist.ignoreWhite = true;
var listClips:Array = new Array();
var whoIsOn:Number = 0;
var xBegin:Number = videoList._x= 0;

vlist.onLoad = function() {
var videos:Array = this.firstChild.childNodes;
for (i=0; i<videos.length; i++) {
   var a = videoList.attachMovie("listEntry", "listEntry"+i, videoList.getNextHighestDepth());
   listClips.push(a);
   a._x = a._height*i;
   a._alpha = 66;
   loadMovie(videos*.attributes.thumb, a.tHolder);
   a.vName.text = videos*.attributes.name;
   titleURL.push(videos*.attributes.desc) //load titles
    description.text = titleURL[whoIsOn]; //load titles 
   a.numb = i;
   a.urlLink = videos*.attributes.url;
   a.xLoc = (xBegin+(mask._width/2))-(a._x+(a._width/2));
   a.onRelease = function() {
      getNewVid(this);
   };
   a.onRollOver = function() {
      if (this.numb<>whoIsOn) {
         this._alpha = 100;
         this.accent._alpha = 100;
         this.back._alpha = 0;
      }
   };
   a.onRollOut = a.onReleaseOutside=function () {
      if (this.numb<>whoIsOn) {
         this._alpha = 66;
         this.accent._alpha = 0;
         this.back._alpha = 100;
      }
   };
   a.onRelease = function() {
      if (this.numb<>whoIsOn) {
         getNewVid(this);
         bufferClip._visible = true;
      }
      description.text = videos[whoIsOn].attributes.desc;
   };
}
xEnd = xBegin-videoList._width+mask._width+5;
getNewVid(listClips[whoIsOn]);
};

vlist.load("http://web.minnetonka.k12.mn.us/Video%20Library/videos_beta.xml");

videoList.onRollOver = scrollPanel;

function panelOver() {
speed = 10;
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}

var b = mask.getBounds(_root);

function scrollPanel() {
if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
   this.onRollOver = panelOver;
   delete this.onEnterFrame;
}
var xDist = _xmouse-150;
videoList._x += -xDist/speed;

if (videoList._x>=xBegin) {
   videoList._x = xBegin;
}
if (videoList._x<=xEnd) {
   videoList._x = xEnd;
}
}

function getNewVid(who) {
ns.play(who.urlLink);
whoIsOn = who.numb;
description.text = titleURL[whoIsOn]; //load titles
z = who.xLoc;
if (z>=xBegin) {
   z = xBegin;
}
if (z<=xEnd) {
   z = xEnd;
}
easeList(z);
for (i=0; i<listClips.length; i++) {
   if (listClips*.numb == whoIsOn) {
      listClips*._alpha = 100;
      listClips*.frame._alpha = 100;
      listClips*.back._alpha = 0;
      listClips*.accent._alpha = 0;
   } else {
      listClips*._alpha = 66;
      listClips*.frame._alpha = 0;
      listClips*.back._alpha = 100;
      listClips*.accent._alpha = 0;
   }
}
}

function easeList(where) {
delete videoList.onRollOver;
delete videoList.onEnterFrame;
videoList.onEnterFrame = function() {
   xDist = (videoList._x-where)/7;
   videoList._x -= xDist;
   if ((videoList._x<(where+1)) && (videoList._x>(where-1))) {
      delete videoList.onEnterFrame;
      videoList.onRollOver = panelOver;
   }
};
}[/FONT]