Flash Sprite looses focus on MOUSE_DOWN event

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2011-01-15T14:20:11Z Indexed on 2011/01/15 23:53 UTC
Read the original article Hit count: 183

Filed under:
|
|

My Sprite class keeps losing focus when I click with the mouse - specifically after the MOUSE_DOWN event (before the click is complete).

I have set mouseEnabled to false on the children, no change. I added a listener for FOCUS_OUT and noticed that the FocusEvent.relatedObject property is NULL, which is confusing me - doesn't that mean there is no new focus target, the focus is just getting lost?

The exact sequence of events I get, by tracing them, as I click:

[FocusEvent type="focusOut" bubbles=true cancelable=false eventPhase=2 relatedObject=null shiftKey=false keyCode=0]
[MouseEvent type="mouseDown" bubbles=true cancelable=false eventPhase=2 localX=355 localY=362 stageX=360 stageY=367 relatedObject=null ctrlKey=false altKey=false shiftKey=false buttonDown=true delta=0])
[MouseEvent type="click" bubbles=true cancelable=false eventPhase=2 localX=355 localY=362 stageX=360 stageY=367 relatedObject=null ctrlKey=false altKey=false shiftKey=false buttonDown=false delta=0]

© Stack Overflow or respective owner

Related posts about flex

Related posts about flash