flex 3 cancel tooltip event

Posted by gmoniey on Stack Overflow See other posts from Stack Overflow or by gmoniey
Published on 2010-04-13T09:28:56Z Indexed on 2010/04/13 9:33 UTC
Read the original article Hit count: 337

Filed under:
|

I am trying to cancel a tooltip event (I only want it to display when the mouse is hovered over a certain area), and can't seem to figure it out. I tried stopPropagation, preventDefault, and stopImmediatePropagation, but none of them seem to work.

Here the code I am using:

        private function toolTipCreateHandler(event:ToolTipEvent):void {
            if(event.currentTarget.mouseX < 130) {
                var tooltip:PhotoToolTip = new PhotoToolTip();
                tooltip.src = event.currentTarget.toolTip;
                event.toolTip = tooltip;
            }
            else {
                event.stopImmediatePropagation();
            }
        }   

Any ideas?

Thanks

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about flex3