title: removeEventListener for anon function in AS3
body: <p>I need to disable an onClick action until an animation has stopped. Animations can be started by 4 different buttons - all need to be deactivated.</p>
  
  <p>I use a listener to pass params to the function that will initiate the animation which is why I use an anonymous function in the add listener:</p>
  
  <pre><code>up.addEventListener(MouseEvent.CLICK, 
      function(event:MouseEvent):void
      { 
          revealSpinner(event,51.42,1,spinner);
          event.currentTarget.removeEventListener(event.type, arguments.callee);
      },
      false, 0, true);
  </code></pre>
  
  <p>I also have a self calling remove listener, but really I need to remove the listener from the other 3 buttons.</p>
  
  <p>I have also tried naming the anonymous function but that didn't work:</p>
  
  <pre><code>up.addEventListener(MouseEvent.CLICK, 
      myFunc = function(event:MouseEvent):void
      { 
          revealSpinner(event,51.42,1,spinner);
      },
      false, 0, true);
  
  // somewhere else in my app
  up.removeEventListener(MouseEvent.CLICK, myFunc ); 
  </code></pre>
  
  <p>Edit:
  each of the 4 buttons has to pass different parameters to the revealSpinner() method
  revealSpinner(event,51.42,1,spinner);
  revealSpinner(event,51.42,-1,spinner);
  revealSpinner(event,120,1,anotherMC);
  revealSpinner(event,120,-1,anotherMC);</p>