That is the problem, i need to track the mouse movements(and register what component is under the mouse), it is done already, but i meet new problem, if click right button then context menu will be opened and no any new events(mouseMove, mouseOver) received by my components. I understand that this context menu is more browser then flash/flex and afaiu the is no way to disable context menu at all. So may be somebody know any trick to avoid this events blocking?
0
votes
First off, why do you need to track mouse position at all times? seems a bit overkill. Second, no, it's not possible.
- J_A_X
In general, i need to catch the moment when cursor leaves the bounds of button
- mulya
ever heard of rollover/rollout or mouseover/mouseout?
- J_A_X
just disable the SWF when it loses focus
- The_asMan
1 Answers
0
votes
I agree this may seem like overkill but you can block the default right click menu. It's not a completely clean self contained Flex solution but:
http://www.einternals.com/blog/web-development/flashflex/disable-right-click-menu-in-flash
Using a bit of JS and the appropriate wmode is all that's needed so far as I know, this way the mouse events can be captured and blocked in JavaScript before they ever make it to your flash object. The difficulty here is in accommodating all the different browsers method of interpreting the JavaScript and the flash player wmode. It's a mixed bag of works on X doesn't work on Y but I'm sure with a bit of diligence you can make this work for a vast majority of your user base.
Shaun