title: ActionScript, possible race condition on mouse event
body: <p>I'm at a bit of a loss here. I have an issue that I think may be due to mouse events taking precedence. I have a function <code>f</code> being invoked on mouse clicks - <code>f</code> does some work, then invokes another function <code>g</code>. Is it even possible that <code>f</code> runs, then another click happens - invoking <code>f</code> again - and <em>then</em> <code>g</code> is executed? </p>
  
  <p>If my phrasing is hard to understand, I'll try to show what I think may be happening:</p>
  
  <pre><code>    click1 -----       /-----------\
                  \     /             \
                    f --      f--      g    g
                             /   \         /
        click2 ------------ /     \--------
  
   |---------------- timeline----------------------|
  </code></pre>
  
  <p>I can say for certain the issue only arises (out of ~50 slow and ~50 quick double-clicks) when clicking twice in very quick succession (and not always even then). I realize my figure may confuse more than it clarifies, but I'm not sure how else to communicate my thoughts. Any input is greatly appreciated!</p>