3 Replies Latest reply on Apr 10, 2010 9:20 PM by Flex harUI

    Detect mouse events anywhere

    oscar7878 Level 1

      Hi,

       

      I created a resizable container (Flash Builder / SDK 4), that listens to several mouse events. It has handles that you can drag to change its size. It has horizontal handles and vertical handles. The problem I have is that if I'm dragging the horizontal handle, for example,  (changing its width) and I move the mouse down (out of the handler), the handle doesn't detect the MouseEvent.MOUSE_UP, when I release it. So, I need to be able to detect when the mouse left button is released anywhere in the application, so I can stop the deformation.

       

      I tried something like:

       

      stage.removeEventListener(MouseEvent.MOUSE_UP, handleDragStop);

       

      but it didn't work as expected.

       

      Any ideas will be appreciated.

       

      Tks.