
03.12.2009, 15:28
|
|
Регистрация: Nov 2008
Сообщений: 33
|
вот так вот заработало всё
for (var i:Number = 1; i <= 20; i++) {
this["mc"+i].onPress = function():Void {
this.startDrag();
this.swapDepths(getNextHighestDepth());
}
this["mc"+i].onRelease = function():Void {
this.stopDrag();
for (var n:Number = 1; n <= 20; n++) {
if (this.hitTest(_root["m"+n])) {
this._x = _root["m" + n]._x;
this._y = _root["m" + n]._y;
trace ("ок");
delete this.onPress;
delete this.onRelease;
}
}
}
}
Добавлено через 4 минуты
спасибо за помошь. )
|