Question

I've this code in flex where I register a mouse out event listener -

... 
var b:Button = new Button(); 
b.addEventListener(MouseEvent.MOUSE_OUT, buttonOutHandler);
... 
private function buttonOutHandler(evt:MouseEvent):void { 
 ... 
} 

Problem that I am facing is that sometimes when I move my mouse out of the display Object that is Button I don't receive an event for mouse out.

It is mostly when I move it fast out of the Button area. Am I doing anything wrong? Any suggestions on how to get this implemented so that I don't miss the event?

Was it helpful?

Solution

You could try the rollOut event insted of the MouseOut. Very similar, but yet different. If whatever you've added the listener to has its own children then you should definatly use the rollOut event.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top