Really killing an event, or at least simulating dragOut/Over?

I’m sure this is doable through some unholy concoction of event phases and other such alchemies, but it’s beyond my ken at the moment.

I have a button that lives on a touch screen (so there are no traditional rollOver/Out interactions).

If a user holds down on a button, then releases his finger somewhere outside of that button, the stage knows to handle accordingly.

My issue is this: Currently, the user can press a button and move his finger away from it, then move it back over the button, and it’ll fire. Is there a way to prevent this from happening? Rather, is there a way so that when the user drags out of the button, I can ensure that if he moves it back over the button without having released, the button won’t accept it? stopImmediatePropagation() isn’t doing the trick (I thought it would).

Barring this, is there a way to fake a “dragOver” event from the dark ages? I’d greatly appreciate any insight. (I’ve gone through Senocular’s stuff, but I’m apparently too dense to grasp it. :frowning: ) Thanks!

So, if a user drags their finger off the button, does a MOUSE_OUT event fire? If so, you could kill the interaction right there.

edit:

The reason I ask is that the way to fake dragOver and dragOut is typically by using MOUSE_OVER and MOUSE_OUT events:


myButton.addEventListener(MouseEvent.MOUSE_OUT, dragOut);

function dragOut(e:MouseEvent):void
{
     if (e.buttonDown)
     {
          trace('dragOut');
     }
}

[quote=Anogar;2327352]So, if a user drags their finger off the button, does a MOUSE_OUT event fire? If so, you could kill the interaction right there.

edit:

The reason I ask is that the way to fake dragOver and dragOut is typically by using MOUSE_OVER and MOUSE_OUT events:

ActionScript Code:
[LEFT]myButton.[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]MouseEvent.[COLOR=#000080]MOUSE_OUT[/COLOR], dragOut[COLOR=#000000])[/COLOR];

[COLOR=#000000]function[/COLOR] dragOutCOLOR=#000000[/COLOR]:[COLOR=#0000FF]void[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]if[/COLOR] COLOR=#000000[/COLOR]
[COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]trace[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]

[/quote]

Yeah, there’s a MOUSE_OUT that fires when the user moves out of the button (and a check to see it the button’s currently down or not), but for some reason, that doesn’t appear to kill everything…though it’s possible I have some extra junk in there that I’ll need to reevaluate…thanks for your input!