What’s the correct way to detect, from Flash, when someone has started a drag within the browser (eg, a MOUSE_DOWN event), dragged the mouse outside the browser window, released the button, then moved the mouse back over the browser?
For example (assuming StackOverflow was a Flash application):
alt text http://img.skitch.com/20100531-t99mni7s8sjs8ycqe5ebyaxphm.png
I’ve tried the “obvious” thing, checking event.buttonDown in the MOUSE_MOVE handler, but even though the mouse button is up, event.buttonDown is true in step 2 (above).
So, is there any other way to check the “real” status of the mouse button? Or any other way to handle this situation?
After doing a bit of digging in the Flex source, it seems like they use the
SandboxMouseEvent.MOUSE_UP_SOMEWHEREevent. Some limited testing suggests that this is one way of correctly detecting mouse-ups outside of Flash (albeit using Flex):