for (i=1; i<=dati.totale; i++) {
var holder:MovieClip = _root.createEmptyMovieClip("holderImg"+i,i);
var oggetto:MovieClip = holder.createEmptyMovieClip("bot"+i,i);
oggetto.loadMovie(this["img"+i]);

holder.onEnterFrame = function() {
if (this.getBytesLoaded() == this.getBytesTotal() && this.getBytesTotal()>=0) {
delete this.onEnterFrame;

this.onPress = function() {
startDrag(this);
};
this.onRelease = function() {
stopDrag();
};
}
};
oggetto._x = 10;
oggetto._y = 30*i;
with (oggetto) {
initx = _x;
inity = _y;
}
var new_x = _x - initx;
var contenitore:MovieClip = _root.createEmptyMovieClip("cont_text"+i, _root.getNextHighestDepth());
var text_x:TextField = contenitore.createTextField("posiz_x"+i, _root.getNextHighestDepth(), 200, 300, 45, 20);
text_x.variable = "new_x";
text_x.text=new_x;
text_x.type="dynamic";
text_x.selectable=false;
text_x.border=true;
text_x.borderColor=0xffffff;
}

grazie!