How to Break a looping slideshow?

Hi people, here i have an XML slideshow, my client want to add or remove himself pictures by XML. This slideshow loop after the last image but I want the slideshow to Break the loop when reaching XML’s lastNode or LastChild and then gotoAndPlay a frame. I know it’s in this script, can someone figure it out?

import flash.display.Sprite;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.media.Video;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.events.Event;
import flash.events.TimerEvent;
import flash.events.NetStatusEvent;
import flash.utils.;
import flash.geom.
;
import flash.display.;
import flash.xml.XMLDocument;
import flash.xml.XMLNode;
import flash.xml.XMLNodeType;
import com.flash9.xml.
;
import com.flash9.load.;
import com.flash9.engines.
;
// references aux classes
var slideshow:SlideShow;
//load xml
var info:ImagesXML = new ImagesXML();
info.addEventListener(Event.COMPLETE, onXML);
info.load(“banner.xml”);
function onXML(event:Event):void {
container.x=54;
container.y=32;
// load images
for (var i:uint=0; i<info.images.length(); i++) {
this[“image”+i] = new LoadImage(container);
this[“image” + i].load( info.images* );
}
//slideshow
slideshow = new SlideShow(container);
slideshow.start();
}

and banner.XML file:
<?xml version=“1.0” encoding=“iso-8859-1”?>
<banner time=“5.5”>

&lt;pictures&gt;
    &lt;image&gt;stretch1.jpg&lt;/image&gt;
    &lt;image&gt;stretch2.jpg&lt;/image&gt;
    &lt;image&gt;stretch3.jpg&lt;/image&gt;
    &lt;image&gt;stretch4.jpg&lt;/image&gt;
    &lt;image&gt;stretch5.jpg&lt;/image&gt;
&lt;/pictures&gt;

</banner>