Ciao questo è il codice action script che segue che ho usato per realizzare una slideshow..
non so perchè ma al momento di testare il filmato mi dice che vi è un error opening url,nei messaggi di output errore..(praticamente non carica il file xml)..Se qualcuno mi aiuta mi fa un favore..grazie...
questo è il codice..
var x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();
var captions:Array = new Array();
var indicizza: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];
indicizza=0;
}
x.load('test/data.xml')
indietro.onRelease = function(){
if(indicizza > 0) {
indicizza--;
holder.loadMovie(urls[indicizza]);
caption.text = captions[indicizza];
}
}
avanti.onRelease = function(){
if(indicizza < urls.length-1){
indicizza++;
holder.loadMovie(urls[indicizza]);
caption.text = captions[indicizza];
}
}