Добрый Всем день. Имеется такой код:

Код AS3:
private function mouse_click(e:MouseEvent):void {
box = new Box();
addChild(box);
num_in_array = int(Math.random() * 10);
pos_in_coord = positions[num_in_array];
box.n = num_in_array; //что бы передать в ф-цию слушителя
eBox = new Box();
box.x = pos_in_coord;
// при быстром добавлении друг на друга квадраты "залезать" не будут
if (managerBox[num_in_array].length >= 1) {
if (box.y + box.height >= eBox.y) {
box.y = eBox.y - box.height;
}
}else {
box.x = pos_in_coord;
box.y = 0;
}
box.addEventListener(Event.ENTER_FRAME, b_enf);
managerBox[num_in_array].push(box);//двумерный массив
}

Код AS3:
private function b_enf(e:Event):void {
eBox1 = e.currentTarget as Box;
eBox1.y += b_speed;
if (eBox1.y > ENDPOSITION-(eBox1.height*managerBox[eBox1.n].length)) {
eBox1.y = ENDPOSITION - (eBox1.height * managerBox[eBox1.n].length);
eBox1.removeEventListener(Event.ENTER_FRAME, b_enf);
}
}
Проблема заключается в следующем:
Когда Box падает вниз с определенной скоростью и в определенное место, то он может совмещаться координатами со следующим за ним Box'ом, т.е получается что место одно пустое. ;(