1 Reply Latest reply on Feb 17, 2010 4:35 PM by Flex harUI

    I need to event.PreventDefault() when event.cancelable = false

    Bruno C.

      Short question

      I need to cancel "TitleWindow.titleBar.MOUSE_DOWN" event using event.PreventDefault() because I am implementing my own custom dragger. A trace(event) shows that it isn't cancelable. TitleWindow.isPopup is set to false alreay but TitleBar continuesto listen to MOUSE_DOWN event. Is there any bypass/way to cancel that event? Ideas?

       

      Long explanation

      I'm extending a TitleWindow to make it resizable. Moving the window works great in Chrome/Firefox but not in Internet Explorer. When using IE the window stops being dragged when mouse cursor moves out of the stage (flash).

       

      So I've started to fiddle with stage.MOUSE_SOWN event and I found that when you press the mouse out of the TitleWindow Flex is able to track mouse position changes usign stage.MOUSE_MOVE even if mouse cursor leaves the stage. But when you press the mouse button over the titleBar MOUSE_MOVE stops firing as soon as the mouse leaves the stage.

       

      So my idea was to, cancel/preventDefault() MOUSE_DOWN event on titleBar and use my own stage.MOUSE_DOWN to start dragging the window.

       

      Thanks for reading. Ideas?