codice:
mioxml = new XML();
mioxml.path = this;
mioxml.ignoreWhite = true;
mioxml.onLoad = function(success) {
if (success) {
arrayLivello = new Array();
arrayLivello = this.firstChild.childNodes;
for (i=0; i<arrayLivello.length; i++) {
if (arrayLivello[i].nodeName == "livello") {
trace(arrayLivello[i].attributes.testo)
this.path.mc.duplicateMovieClip("mc"+i, i);
this.path["mc"+i]._y = this.path.mc._y + (20*i);
this.path["mc"+i].testo = arrayLivello[i].attributes.testo;
this.path["mc"+i].tipo = arrayLivello[i].attributes.tipo;
this.path["mc"+i].percorso = arrayLivello[i].attributes.link;
arraySottoLivello = new Array();
arraySottoLivello = arrayLivello[i].childNodes;
for (j=0; j<arraySottolivello.length; j++) {
if (arraySottoLivello[j].nodeName == "sottolivello") {
trace(arraySottoLivello[j].attributes.testo);
this.path.sottomenu.duplicateMovieClip("sottomenu"+j, j);
this.path["sottomenu"+j]._y = this.path.sottomenu._y + (20*j);
}
}
}
}
} else {
trace("errore");
}
};
mioxml.load("menu.xml");
Aggiungendo la parte di codice della stampa dei movieclip succede che il trace viene eseguito correttamente, mentre i movieclip che contengono i sottomenù scompaiono e vengono visualizzati i suoi sottomenù.
Sarà l'orario ma non ci capisco + nulla :master: