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 9298983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:27:18+00:00 2026-06-18T22:27:18+00:00

Using Flash Professional CS5, I’m trying to add a child object in my script.

  • 0

Using Flash Professional CS5, I’m trying to add a child object in my script. I want to give the class which creates the child-object as parameter while creating. The problem is when I try to test the project, I get an error stating Incorrect number of arguments. 0 expected.

My MainClass.as:

package  {

import flash.display.MovieClip;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;

public class MainClass extends MovieClip {

    var menuClass:MenuClass;
    var gameClass:GameClass;
    var highClass:HighscoreClass;

    public function Main() {
        this.StartOfProject();
    }

    public function StartOfProject() {
        menuClass = new MenuClass(this);
        this.addChild(menuClass);
        highClass = new HighscoreClass();
    }

And my MenuClass.as:

package  {

public class MenuClass extends MovieClip {
    var mainClass:MainClass;

    public function Menu(mainClass:MainClass) {
        this.mainClass = mainClass;
        ...
    }

What am I doing wrong?

  • 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-06-18T22:27:19+00:00Added an answer on June 18, 2026 at 10:27 pm

    You named the constructor of your MenuClass incorrectly. It should be “MenuClass” not “Menu”

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

Sidebar

Related Questions

I am very new to Action Script. I am using Flash Professional CS5 with
I have a Flash Professional CS5 movie which I'm trying to pass a parameter
I am trying to follow this guide: http://tv.adobe.com/watch/learn-flash-professional-cs5/using-flash-pro-and-flash-builder-together/ While using CS6 Flash Pro and
I'm using Flash Professional cs5/AS3 I'll try and describe this the best I can.
I run the following code using Adobe Flash Professional CS5.5, Flash Player 11.2.202.235, ActionScript
I create an augmented reality application on android using the Adobe Flash Professional CS5
Using Flash CS5 Professional I have created a symbol, dragged it onto the stage,
I have some class that I created visually in Flash Professional CS5 by transferring
I embedded font using Flash Professional CS5, but I still can't use it in
I have Adobe Media Server 4, and I am using Flash Professional CS5.5 to

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.