Здравствуйте все =)
в общем есть 2 класса: главный в котором вычисляются все параметры объектов и добавляются в список отображения, и класс конструктор для объектов, в который передаются только параметры этих объектов, а конструктор на их основе создаёт 3 объекта частично накладываемых друг на друга.
мне нужно, чтобы по нажатию мыши на любой из этих 3 объектов и дальнейшему перемещению курсора (до отпускания кнопки), все 3 объекта перетаскивались.
искал в инете, наткнулся на такой код:

Код AS3:
// This code creates a drag-and-drop interaction using the mouse-following
// technique.
// circle is a DisplayObject (e.g. a MovieClip or Sprite instance).
import flash.events.MouseEvent;
var offsetX:Number;
var offsetY:Number;
// This function is called when the mouse button is pressed.
function startDragging(event:MouseEvent):void
{
// Record the difference (offset) between where
// the cursor was when the mouse button was pressed and the x, y
// coordinate of the circle when the mouse button was pressed.
offsetX = event.stageX - circle.x;
offsetY = event.stageY - circle.y;
// tell Flash Player to start listening for the mouseMove event
stage.addEventListener(MouseEvent.MOUSE_MOVE, dragCircle);
}
// This function is called when the mouse button is released.
function stopDragging(event:MouseEvent):void
{
// Tell Flash Player to stop listening for the mouseMove event.
stage.removeEventListener(MouseEvent.MOUSE_MOVE, dragCircle);
}
// This function is called every time the mouse moves,
// as long as the mouse button is pressed down.
function dragCircle(event:MouseEvent):void
{
// Move the circle to the location of the cursor, maintaining
// the offset between the cursor's location and the
// location of the dragged object.
circle.x = event.stageX - offsetX;
circle.y = event.stageY - offsetY;
// Instruct Flash Player to refresh the screen after this event.
event.updateAfterEvent();
}
circle.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
circle.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
адаптировал этот код под свою программу и добавил trace-ров для отслеживания. но в итоге при нажатии и перемещении соответствующие сообщения в консоль выдаются, но никакого перемещения не происходит. подскажите как можно это исправить?