Ho questo codice che prende dati da un xml e dopo 6 secondi passa al secondo frame:
onClipEvent (load) {
this.stop();
mio_xml = new XML();
mio_xml.path = this;
mio_xml.ignoreWhite = true;
mio_xml.onLoad = function(success)
{
if(success){
var t1 = "<font color='#e5566d'>", t2 = "</font>";
var nodes = this.firstChild.childNodes;
this.path.testo = "ELENCO CONSULENTI
"
for(var i = 0; i < nodes.length; i++){
//this.path.testo += "
<font color='#e5566d'>********************</font>
";
//this.path.testo += "<font color='#FFFFFF'>Step: </font>" + nodes[i].attributes.step + "
";
//this.path.testo += "********************
";
for(var j = 0; j < nodes[i].childNodes.length; j++){
var nome = nodes[i].childNodes[j].attributes.nome;
var time = nodes[i].childNodes[j].attributes.time;
var tempo = nodes[i].childNodes[j].attributes.tempo;
this.path.testo += "Totale: " + (j + 1) + "
";
this.path.testo += "Nome: " + t1 + nome + t2 + "
";
this.path.testo += "Data: " + t1 + time + t2 + "
";
}
}
} else {
this.path.testo = "caricamento errato";
}
this.path.nextFrame();
};
mio_xml.load("consulenti2.xml");
cl = setInterval(function () {
gotoAndPlay(2);
clearInterval(cl);
},6000);
//5secondi
}
se volessi sostituire a 6000 il valore dell'attributo tempo che espressione dovrei inserire?
questo è l'xml:
<?xml version="1.0" encoding="utf-8"?>
<categorie>
<elenco step="2000">
<consulente nome="Paolo Rossi" time="10/10/2000" tempo="2000"/>
</elenco>
</categorie>