title: Why am I getting 'Argument count mismatch' error here?
body: <p>I have a Document class, <strong>Intro</strong> class and <strong>Nav</strong> class.</p>
  
  <p>The <strong>Intro</strong> class runs first, then sends a custom dispatch event to run the <strong>Nav</strong> class, but I'm getting this error:</p>
  
  <pre><code>removed Intro
  ArgumentError: Error #1063: Argument count mismatch on com.secrettowriting.StanPlayer.ui::Navigation/addNav(). Expected 0, got 1.
  at flash.events::EventDispatcher/dispatchEventFunction()
  at flash.events::EventDispatcher/dispatchEvent()
  at com.secrettowriting.StanPlayer.display::Intro/removeIntro()
  at flash.utils::Timer/_timerDispatch()
  at flash.utils::Timer/tick()
  </code></pre>
  
  <p><strong>The addNav function in the Navigation class should expect 0 arguments/variables and I'm not sending any arguments/variables to it, which is why I'm confused as to why it's saying I'm getting 1.</strong></p>
  
  <p><strong>(1)</strong> This runs, attaches complete listener</p>
  
  <pre><code>private function drawIntro():void
  {
      intro = new Intro();
      intro.drawIntro();
      intro.addEventListener("onComplete", nav.addNav);
      stage.addChild(intro);
  }
  </code></pre>
  
  <p><strong>(2)</strong> In the Intro class this function will hit and send the dispatch event, but I get that error right after the trace statement.</p>
  
  <pre><code>private function removeIntro(e:TimerEvent):void
      {           
          if (n &lt; 10){
              n++
          } else if (n == 10){
              introRemover.removeEventListener(TimerEvent.TIMER, removeIntro);
              removeChild(introMov);
              trace("removed Intro");
  
              dispatchEvent (new CustomEvent(CustomEvent.COMPLETE, {})); // → Intro to Navigation
          }
      }
  </code></pre>
  
  <p><strong>(3)</strong> Which is then suppose to trigger this function in Navigation</p>
  
  <pre><code>public function addNav():void
      {
          trace("addNav ----");
          addChild(weAreA);
          addChild(introText);
          addChild(chooseAVideo);
  
          TweenLite.to(weAreA, 2, {alpha:1});
          TweenLite.to(introText, 3, {alpha:1});
          TweenLite.to(introText, 3, {alpha:1});
      }
  </code></pre>
  
  <p><br/><br/>
  <strong>Class Code --------------------------------------------------------------</strong></p>
  
  <h2>My Document Class:</h2>
  
  <pre><code>    public function HomePlayer():void
      {
          if (stage) init();
          else addEventListener(Event.ADDED_TO_STAGE, init);
      }
  
      private function init(e:Event = null):void 
      {
          removeEventListener(Event.ADDED_TO_STAGE, init);
  
          stage.scaleMode = StageScaleMode.NO_SCALE;
          stage.align     = StageAlign.TOP_LEFT;
  
          // Use when Live
              //videoURL = this.loaderInfo.parameters.theVIDEO; // Get the Video URL from HTML
  
          // Remove when video testing ready
              videoURL = "videos/WhatDifferentiatesUs.flv";
  
          drawNav();
          drawIntro();
      }
  
      private function drawIntro():void
      {
          intro = new Intro();
          intro.drawIntro();
          intro.addEventListener("onComplete", nav.addNav);
          stage.addChild(intro);
      }
  
      private function drawNav():void
      {
          nav = new Navigation();
          nav.drawNav();
          stage.addChild(nav);
      }
  </code></pre>
  
  <p><br/></p>
  
  <h2>Intro Class:</h2>
  
  <pre><code>    Public function Intro():void
      {
          if (stage) init();
          else addEventListener(Event.ADDED_TO_STAGE, init);
      }
  
      private function init(e:Event = null):void {
          removeEventListener(Event.ADDED_TO_STAGE, init);
      }
  
      public function drawIntro():void
      {           
          introMov       = new IntroMov();
          introMov.alpha = 0;
  
          addChild(introMov);
  
          TweenLite.to(introMov, 3, {alpha:1});
  
          // Timer
          introFader = new Timer(INTRO_DELAY);
          introFader.addEventListener(TimerEvent.TIMER, fadeIntro);
          introFader.start();
  
          introRemover = new Timer(INTRO_DELAY);
          introRemover.addEventListener(TimerEvent.TIMER, removeIntro);
      }
  
      private function fadeIntro(e:TimerEvent):void
      {
          if (i &lt; 30){
              i++
          } else if (i == 30){
              TweenLite.to(introMov, 1.5, {alpha:0});
              introFader.removeEventListener(TimerEvent.TIMER, fadeIntro);
              introRemover.start();
          }
      }
  
      private function removeIntro(e:TimerEvent):void
      {           
          if (n &lt; 10){
              n++
          } else if (n == 10){
              introRemover.removeEventListener(TimerEvent.TIMER, removeIntro);
              removeChild(introMov);
              trace("removed Intro");
  
              dispatchEvent (new CustomEvent(CustomEvent.COMPLETE, {})); // → Intro to Navigation
          }
      }
  </code></pre>
  
  <p><br/></p>
  
  <h2>Navigation Class functions:</h2>
  
  <pre><code>  public function drawNav():void
      {           
          weAreA       = new WeAreA();
          weAreA.alpha = 0;
          weAreA.x     = 20;
          weAreA.y     = 35;
  
          introText       = new IntroText();
          introText.alpha = 0;
          introText.x     = 20;
          introText.y     = 124;
  
          chooseAVideo       = new ChooseAVideo();
          chooseAVideo.alpha = 0;
          chooseAVideo.x     = 20;
          chooseAVideo.y     = 336;
      }
  
      public function addNav():void
      {
          addChild(weAreA);
          addChild(introText);
          addChild(chooseAVideo);
  
          TweenLite.to(weAreA, 2, {alpha:1});
          TweenLite.to(introText, 3, {alpha:1});
          TweenLite.to(introText, 3, {alpha:1});
      }
  </code></pre>