title: AS3 Error 1067 (implicit coercion) when trying to addEventListener
body: <p>So I'm developing a sorting game for a game jam, and my AS3 skills are still a bit unrefined.</p>
  
  <p>I have an InputManager.as that determines whether the device is touch-capable or not, and then in the classes that need it, grabbing that info.</p>
  
  <p>Problem I'm having is:</p>
  
  <blockquote>
    <p>C:\GameDev\Progressive Bytes\Dan\Scripts\Screens\Buttons.as, Line
    55    1067: Implicit coercion of a value of type String to an unrelated
    type Function.</p>
  </blockquote>
  
  <p>Here's where the problem is:</p>
  
  <pre><code>        if(InputManager.isTouch){
              this.addEventListener(TouchEvent.TOUCH_BEGIN, TouchEventHandler);
          } else {
              this.addEventListener(MouseEvent.MOUSE_OVER, over);
          }
  </code></pre>
  
  <p>This is in the Button's constructor.</p>
  
  <p>I've done a bit of searching around, but I can't seem to find any answers about a 1067 on an event listener that are relevant to this problem. But, as I said, kind of a noob with AS3.</p>
  
  <p>Thanks!!</p>