for (var i=0; i<16; i++){ mass[i].i = i; mass[i].onPress = function () { this.startDrag(); trace(this.i); } }