Hi,
In order to decrease the delay between pictures in my xml slideshow, I would like to preload the next image in the background so that when the use clicks the next button there is now delay. I am not sure exactly how to go about doing this. Here is my flash action script so far:
you could see the slide show at http://jasonkb.com/book-6.html and click on portrait flash
Thanks,
Jason Attach 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*.attributes.url);
captions.push(photos*.attributes.caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
whoIsOn = 0;
}
x.load(“portrait.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];
}
}