public void SetButtonEvents() { SetButtonState(ButtonState.up); if (!mc.hasEventListener(MouseEvent.CLICK)) { mc.addEventListener(MouseEvent.CLICK, btnClickCallback); } if (!mc.hasEventListener(MouseEvent.MOUSE_DOWN)) { mc.addEventListener(MouseEvent.MOUSE_DOWN, OnBtnsDown); } if (!mc.hasEventListener(MouseEvent.MOUSE_ENTER)) { mc.addEventListener(MouseEvent.MOUSE_ENTER, OnBtnsEnter); } if (!mc.hasEventListener(MouseEvent.MOUSE_LEAVE)) { mc.addEventListener(MouseEvent.MOUSE_LEAVE, OnBtnsLeave); } if (!mc.hasEventListener(MouseEvent.MOUSE_UP)) { mc.addEventListener(MouseEvent.MOUSE_UP, OnBtnsLeave); } }