Salve a tutti...

mi sto "picchiando" con un lettore di news.

in pratica nel mio filmato ad un certo punto chiamo un lettore di news con 2 campi di testo, uno dove mi elenca tutte le anteprime delle news e l'altro dove, una volta cliccata la news la carico nella sua interezza.

Le mie news sono caricate da un xml.

Nel MC che carica le news (che si chiama contenuto) ho:

// --
news.autoSize = true;
news.html = true;
news.htmlText = "Sto caricando..";
news.styleSheet = formatoCSS;
// --
var nNews:XML = new XML();
nNews.ignoreWhite = true;
nNews.load("xml/eventiXml.xml");
nNews.onLoad = function() {
news.htmlText = "";
qtd = this.childNodes[0].childNodes.length;
for (k=0; k<qtd; k++) {
_global.nData = (this.childNodes[0].childNodes[k].childNodes[0]);
_global.nTitolo = (this.childNodes[0].childNodes[k].childNodes[1]);
_global.nLuogo = (this.childNodes[0].childNodes[k].childNodes[2]);
_global.nAnteprima = (this.childNodes[0].childNodes[k].childNodes[3]);
_global.nFoto = (this.childNodes[0].childNodes[k].childNodes[4]);
_global.nDettagli = (this.childNodes[0].childNodes[k].childNodes[5]);
news.htmlText += "

"+nData+" - "+nTitolo+"</p>"+"

"+nLuogo+"</p>"+"

"+nAnteprima+"</p>"+" Leggi dettagli "+k+"

"+"<font color='#ffffff'> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</font></p>
";
}
};


Mentre la funzione CLICCATO che viene richiamata dall'HTML (e sta un nel filmato padre) è:

_global.formatoCSS = new TextField.StyleSheet();
_global.archivioCSS = "stile_news.css";
formatoCSS.load(archivioCSS);

cliccato = function (k) {
var numero:Number = k;
trace (numero);
trace (k);
this.dettaglioEvento.dettagli.htmlText = (this.contenuto.nNews.childNodes[0].childNodes[numero].childNodes[0]);
this.dettaglioEvento.dettagli.autoSize = true;
this.dettaglioEvento.dettagli.html = true;

Quindi cosa succede: nel trace di numero e di k il lavore è giusto.. ma nel campo di testo appare la voce UNDEFINED.

Se al posto di this.dettaglioEvento.dettagli.htmlText = (this.contenuto.nNews.childNodes[0].childNodes[numero].childNodes[0]); metto

this.dettaglioEvento.dettagli.htmlText = (this.contenuto.nNews.childNodes[0].childNodes[6].childNodes[0]);

legge correttamente il valore del nodo numero 6.

chi sa dirmi perchè? il tutto in AS2

grazie mille