0

I am creating a Flex Panel, which has an image on it. I have set the "buttonMode" and "useHandCursor" property of the image to true. So, whenever I do a mouse over, the cursor changes into a hand tool. I am able to set the mouse-down, mouse-up, mouse-move events on it. But, I see that the mouse-move events only get triggered when I move the mouse inside my Flex panel. I also want to capture the mouse-move event when user moves the mouse outside the Flex panel.

For eg, when user clicks on the image in Flex panel and then drags the mouse(while mouse down) outside the Flex panel, I want to get the current position of mouse while user is dragging the mouse.

Is there any way to get the mouse position outside the Flex panel??

Thanks!

4

1 回答 1

1

The solution for this is "Mouse-Move" event only. I need to do the following: 1. Capture mouse-down event on the image. 2. Register for mouse-move and mouse-up event inside the mouse-down event. 3. Inside the mouse-move event get the position of cursor. 4. Inside the mouse-up event unregister mouse-move event.

于 2012-09-17T13:21:53.870 回答