If you have a function that has been registered as a listener:
mybutton.removeEventListener( 'click', theFunction );
If you donβt ... well, think about code reorganization? You can also add another handler something like this:
mybutton.addEventListener( 'click', function( e:Event ):void {
e.stopImmediatePropagation();
return false;
}, false, 1 );
Which can prevent further handlers from starting (1 at the end is a priority ) ... Sometimes it's hard to say with flex.
source
share