Ciao a tutti,
migrando ad AS3 purtroppo non mi è ancora tutto chiaro. Ad esempio ho creato un clip in libreria esportabile per as. All'interno del clip, sul frame ho dichiarato una variabile che si chiama urlImg. La mia idea è quella di cambiare il valore alla variabile per ogni istanza del clip creata sullo stage, per poi poter leggere successivamente il valore.
È forse sbagliata la logica in partenza?

Il codice è questo:

codice:
for (var k:uint=0; k<prodotto.immagini.children().length(); k++) {
var thumbImg:Anteprima=new Anteprima();
contImg.addChild(thumbImg);
thumbImg.x=86*k;
thumbImg.urlImg=prodotto.immagini.children()[k].children();
thumbImg.addEventListener(MouseEvent.CLICK, carica);

function carica(event:MouseEvent):void{
trace(event.target["urlImg"]);
}
Mi da errore la funzione carica

Chi mi può aiutare?
Grazie