PDA

View Full Version : can i have an event listener for a movieclip's startDrag function?


brisque
11-08-2007, 11:05 PM
hey. lets say i have a movieclip of a beach ball, and i have it startDrag() on mousedown like so:

beachball.addEventListener(MouseEvent.MOUSE_DOWN, moveBall);
function moveBall(event:Event):void {
beachball.startDrag();
}

i want it so while the beachball is being dragged around, it trace()'s the ball's X and Y coordinates out. how do i make an event listener for when the beachball is under a startDrag() status?

senocular
11-08-2007, 11:18 PM
startDrag itself has no event for that. But you can make your own by setting up an ENTER_FRAME event for when startDrag is called and then removing it when stopDrag is called.