Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here's a couple additional tricky things to know (when running in a browser) :</p> <p>One bizarre thing is that in Chrome + Firefox, the MOUSE_LEAVE event isn't dispatched for a <a href="https://stackoverflow.com/questions/886864/differences-between-using-wmode-transparent-opaque-or-window-for-an-embed/6050201#6050201">WMODE</a> of <code>OPAQUE</code> or<code>TRANSPARENT</code>. It just doesn't fire - mouse down or up.</p> <p>With <code>WINDOW</code> it works fine. That one took me a long time to find out! grr... <a href="http://bugs.adobe.com/jira/browse/FP-892" rel="nofollow noreferrer">http://bugs.adobe.com/jira/browse/FP-892</a></p> <hr> <p>Second, make sure you're using <code>Event</code> for the parameter type for your <code>Event.MOUSE_LEAVE</code> handler and not <code>MouseEvent</code>. If you try to handle <code>MOUSE_LEAVE</code> with <code>e:MouseEvent</code> you'll get an error that you may never see (unless you're using the debug flash player). It's a very easy mistake to make because you're probably pointing all your other handlers to the same method.</p> <p>Here's what I do: (just call my main <code>endDrag</code> from <code>mouseLeave(e:Event)</code></p> <pre><code>stage.addEventListener(MouseEvent.MOUSE_MOVE, drag); stage.addEventListener(MouseEvent.MOUSE_UP, endDrag); stage.addEventListener(Event.DEACTIVATE, endDrag); stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave); private function mouseLeave(e:Event):void { endDrag(new MouseEvent("MOUSE_LEAVE")); } public function endDrag(evt:MouseEvent):void { /// handle end drag } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload