почему выбрасывает, если item заходит в область?
если не через массив, то все в порядке, иначе - непонятно, почему возникает проблема...

Код:
var slotArr:Array = [itemSlot0, itemSlot1];
item.onPress = function () {
initX = this._x;
initY = this._y;
this.swapDepths (this._parent.getNextHighestDepth ());
var xDist = this._x - this._parent._xmouse;
var yDist = this._y - this._parent._ymouse;
this.onMouseMove = function () {
this._x = this._parent._xmouse + xDist;
this._y = this._parent._ymouse + yDist;
updateAfterEvent ();
};
};
item.onRelease = function () {
for (var i = 0; i < slotArr.length; i++) {
if (this.hitTest (slotArr[i])) {
this._x = slotArr[i]._x;
this._y = slotArr[i]._y;
} else if (this.hitTest (oblast)) {
this._x = initX;
this._y = initY;
}
}
delete this.onMouseMove;
};