here is some code
action script panel
PHP Code:
var x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();
var captions:Array = new Array();
var whoIsOn:Number;
x.onLoad = function(success) {
var photos:Array = this.firstChild.childNodes;
for(i=0;i<photos.length;i++) {
urls.push(photos[i].attributes.url);
captions.push(photos[i].attributes.caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;
}
x.load("lost.xml");
previous.onRelease = function() {
if(whoIsOn > 0) {
whoIsOn--;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}
next.onRelease = function() {
if(whoIsOn < urls.length-1) {
whoIsOn++;
holder.loadMovie(urls[whoIsOn]);
caption.text = captions[whoIsOn];
}
}
xml file
PHP Code:
-
<slideshow>
<photo url="lost1.jpg" caption="Sayid tries to explain to electronics theory to Kate."/>
<photo url="lost2.jpg" caption="Locke tries again to explain to Jack why he's not crazy."/>
<photo url="lost3.jpg" caption="Its confirmed, Jack's dad is dead as a doornail."/>
<photo url="lost4.jpg" caption="Boone getting saved, but it won't do him any good."/>
<photo url="lost5.jpg" caption="Jack and Hurley saving Claire from the wreckage."/>
</slideshow>
Hope this will help you get your project going