I’m working on a game where I want a player to be able to use arrow buttons and a jump (blue) button. I want the player to be able to slide their finger off and back on the arrows and also to be able to press the jump (blue) button while an arrow button is down. Here’s my listeners for the three buttons (gui[0], gui[1], and gui[3]):
As I understand it, the difference is that MOUSE_OVER bubbles.
This means that if the button has children, then it’ll get a MOUSE_OVER event each time any of those children gets one. And whenever a child gets a MOUSE_OUT event, that event will bubble up to the button itself, even if the mouse was over some other part of the button.
The easy solution is to use ROLL_OUT, but you can also set mouseChildren = false. That way, the children won’t receive events, so there won’t be any events bubbling up, so it won’t matter if you use MOUSE_OUT or ROLL_OUT. (This is nice if you forget which one is which.)