codice:
//creo l'istanza con le sue proprietà
this.createTextField("mytext2",1,100,100,200,100);
mytext2.multiline = true;
mytext2.wordWrap = true;
mytext2.border = true;
mytext2.html = true;
mytext2.label.condenseWhite=true;
//formatto il testo
var myformat:TextFormat = new TextFormat();
myformat.url = "http://www.macromedia.com";
mytext2.setNewTextFormat(myformat);
var myXML2:XML=new XML();
myXML2.ignoreWhite=true;
myXML2.load("servizi.xml");
myXML2.onLoad= function (success){
if(success){
mytext2.text=myXML2.firstChild.firstChild.childNodes;
}
}
adesso funziona... ma non ho capito il perchè "tecnicamente". Mi dite se ho capito bene?? per caso va setNew al posto del solo set perchè lui applica la formattazione PRIMA di aver importato i dati da formattare?
e quindi uso new che li parserizza DOPO l'importazione creando una nuova (new appunto
) formattazione al testo già importato??
Ditemi che ho capito perchè ciò smenato parecchio tempo ....