pulse00
09-26-2008, 10:07 AM
I'm trying to get the position of a UIComponent while dragging it around, but
it seems the MoveEvent is only dispatched when setting x/y props or call the move() method on a component.
myComp.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
myComp.addEventListener(MoveEvent.MOVE, onMoveEvent);
private function onMouseDown(e:MouseEvent):void {
myComp.startDrag();
}
// Never called during drag operation
private function onMoveEvent(e:MoveEvent):void {
trace("myComp moving");
}
Anyone knows if there's any events i could use to get the objects position while dragging it ?
it seems the MoveEvent is only dispatched when setting x/y props or call the move() method on a component.
myComp.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
myComp.addEventListener(MoveEvent.MOVE, onMoveEvent);
private function onMouseDown(e:MouseEvent):void {
myComp.startDrag();
}
// Never called during drag operation
private function onMoveEvent(e:MoveEvent):void {
trace("myComp moving");
}
Anyone knows if there's any events i could use to get the objects position while dragging it ?