Grazie a quanti vorranno rispondermi.

codice:
var fileDati = new LoadVars();
var spaziatore:Number = 0;

fileDati.onLoad = function (ok){
	if (ok){
		var limite:Number = Number (fileDati.img)+1;
		
		for (foto; foto<limite; foto++) {
			var clipImg:MovieClip=_root.attachMovie("clip", "pulsante_"+foto, foto);
			clipImg._x = spaziatore;
			var empty = clipImg.createEmptyMovieClip("loader", 1);
			empty.loadMovie(foto+".jpg");
			var spaziatore:Number = spaziatore+26.5;
			clipImg.onRelease = function()
                              {
                                // IL PROBLEMA E' QUI DENTRO
                                // LA VARIABILE "FOTO" HA SEMPRE VALORE 1
                                // E' UN PROBLEMA DI SCOPE?
		                var pari:Number = foto%=2;
		                if(pari==0){
			        lc = new LocalConnection();
			        lc.send("receiver", "sx", foto+1, foto+2);
			        lc.close();
			        delete lc;
			       }
		        else {
			        lc = new LocalConnection();
			        lc.send("receiver", "sx", foto, foto+1);
			        lc.close();
			        delete lc;
			       }
}
		}
	}
}
fileDati.load("menu_d.txt");
Funziona tutto tranne che in clipImg.onRelease = function() la variabile foto ha sempre e solo valore 1.
E' un problema di scope? E se così fosse, come posso risolverlo?