ci sono 2 errori:

1 - non hai creato l' oggetto XML
2 - all' interno dell' evento onLoad il "this" non si riferisce più alla classe ma all' oggetto xml che hai creato, quindi è come se cercassi di trovare this.testo.testo.loaded...


cosi doverbbe funzionare:


class prova
{

var testo:XML;

function prova(filepath:String)
{

this.testo=new XML();
this.testo.load(filepath);
this.testo.onLoad = function (success)
{
if(this.loaded){
trace (this);
}

}
}
}

ciao