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”>
<pictures>
<image>stretch1.jpg</image>
<image>stretch2.jpg</image>
<image>stretch3.jpg</image>
<image>stretch4.jpg</image>
<image>stretch5.jpg</image>
</pictures>
</banner>