Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 718615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:32:50+00:00 2026-05-14T05:32:50+00:00

I have a Document class, Intro class and Nav class. The Intro class runs

  • 0

I have a Document class, Intro class and Nav class.

The Intro class runs first, then sends a custom dispatch event to run the Nav class, but I’m getting this error:

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()

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.

(1) This runs, attaches complete listener

private function drawIntro():void
{
    intro = new Intro();
    intro.drawIntro();
    intro.addEventListener("onComplete", nav.addNav);
    stage.addChild(intro);
}

(2) In the Intro class this function will hit and send the dispatch event, but I get that error right after the trace statement.

private function removeIntro(e:TimerEvent):void
    {           
        if (n < 10){
            n++
        } else if (n == 10){
            introRemover.removeEventListener(TimerEvent.TIMER, removeIntro);
            removeChild(introMov);
            trace("removed Intro");

            dispatchEvent (new CustomEvent(CustomEvent.COMPLETE, {})); // → Intro to Navigation
        }
    }

(3) Which is then suppose to trigger this function in Navigation

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});
    }

Class Code ————————————————————–

My Document Class:

    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);
    }

Intro Class:

    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 < 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 < 10){
            n++
        } else if (n == 10){
            introRemover.removeEventListener(TimerEvent.TIMER, removeIntro);
            removeChild(introMov);
            trace("removed Intro");

            dispatchEvent (new CustomEvent(CustomEvent.COMPLETE, {})); // → Intro to Navigation
        }
    }

Navigation Class functions:

  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});
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:32:51+00:00Added an answer on May 14, 2026 at 5:32 am

    Look at this line:
    intro.addEventListener("onComplete", nav.addNav);

    When the event is fired, addNav will be called and sent an event object in the parameters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 443k
  • Answers 443k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer after a lot of reading.. what i request may not… May 15, 2026 at 6:22 pm
  • Editorial Team
    Editorial Team added an answer According to man gitignore: DESCRIPTION A gitignore file specifies intentionally… May 15, 2026 at 6:21 pm
  • Editorial Team
    Editorial Team added an answer The following will load all desired lines of a file… May 15, 2026 at 6:21 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.