24
Aug

Want an onReleaseOutside event?

Vote for it now!

Tags: , , , ,

  • http://www.mediamonkey.nl Mediamonkey

    I believe listening to a SandboxMouseEvent will give you the same:

    FlexGlobals.topLevelApplication.stage.addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, mouseUpSomewhereHandler);

    protected function mouseUpSomewhereHandler(event:SandboxMouseEvent):void {
    trace(“mouse up outside the FlashPlayer”);
    }

  • http://www.mediamonkey.nl Mediamonkey

    Sorry, that should be:

    Get the sandboxroot in Flex 4:
    var sandbox:DisplayObject = FlexGlobals.topLevelApplication.systemManager.getSandboxRoot();

    Or when you still use Flex 3:
    var sandbox:DisplayObject = Application.application.systemManager.getSandboxRoot();

    // add listener
    sandbox.addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, mouseUpSomewhereHandler);

    protected function mouseUpSomewhereHandler(event:SandboxMouseEvent):void {
    trace(‘mouse up outside the FlashPlayer’);
    }