
Код:
var objects:Array = [obj1, obj2, obj3, obj4];
var points:Array = [p_first, p_second, p_third, p_forth];
for(i=0; i<objects.length; i++){
objects[i]._i=i;
objects[i].onPress = function () {
this._x = points[this._i]._x;
this._y = points[this._i]._y;
}
}
Зачем нужен был второй фор?