Multiple Button MouseEvent Listeners not working in continuation in as3?
Hi,
I've multple buttons following this drag structure to scale in different direction various corners of the rectangle:
scale_bottomRight.addEventListener(MouseEvent.MOUSE_DOWN,scaleBottomRight_Start);
function scaleBottomRight_Start(mEvent:MouseEvent):void
{
/*code*/
mEvent.target.startDrag(true,new Rectangle(scale_bottomRight.x,scale_bottomRight.y,100,100));
addEventListener(Event.ENTER_FRAME, update_BottomRight);
}
function update_BottomRight(event:Event):void
{
/*code*/
}
scale_bottomRight.addEventListener(MouseEvent.MOUSE_UP, scalebottomRight_Stop);
function scalebottomRight_Stop(event:MouseEvent):void
{
event.target.stopDrag();
event.target.buttonMode = false;
}
scale_bottomRight.buttonMode = true;
However, after the dragging few buttons, other drag buttons don't work and first button flickers ....... i think not removing eventListeners is the problem.... can anyone guide me what i may be doing wrong and if remove eventListener is the problem, do i need to call them on EXIT_FRAME function (as i don't have one) or within somewhere else?