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

  • Home
  • SEARCH
  • 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 9120493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:38:24+00:00 2026-06-17T05:38:24+00:00

I was doing a tutorial and got this error. Line 3 1046: Type was

  • 0

I was doing a tutorial and got this error.

Line 3 1046: Type was not found or was not a compile-time constant: startButton.

I did some research and I found someone who had excatly the same problem. He was helped in the comment section.
the creator of the tutorial told him the following:

“Have you turned “auto-declare stage instances” on, as in the start of Part 1? Also, is your startButton inside the MenuScreen clip, and is the MenuScreen exported for ActionScript?”

Now i think i haven’t auto-declared stage instances. (the other things are done, I did a double check) But it’s a bit vague to me what it means, could you possible tell me how to do “auto-declare stage instances” after already having it all coded.

the link to tutorial: http://gamedev.michaeljameswilliams.com/2008/10/12/avoider-game-tutorial-4/comment-page-5/#comments

package 
{
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.events.MouseEvent;

public class MenuScreen extends MovieClip 
{

    public function MenuScreen()
    {

        startButton.addEventListener( MouseEvent.CLICK, onClickStart );
    }

    public function onClickStart( event:MouseEvent ):void
    {
        dispatchEvent( new NavigationEvent( NavigationEvent.START ) );
    }
}
}
  • 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-17T05:38:25+00:00Added an answer on June 17, 2026 at 5:38 am

    add

    public var startButton:SimpleButton;
    

    or

    public var startButton:MovieClip;
    

    to the class MenuScreen depending on type of startButton on the scene. Be sure that you gave the name startButton to the button instance and don’t forget to assign class MenuScreen to the component that holds the startButton.

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

Sidebar

Related Questions

I'm doing this as part of a Java tutorial, so it is probably not
I'm following this tutorial CSV-FILE-EXPORT-IMPORT-RAILS but something im doing wrong, because i got an
I'm doing the tutorial here . I got everything working up until this point:
I am doing a tutorial according to this article . This is basic Hello
I'm currently doing facebook integration and have gone through this tutorial . So far,
I'm doing a graph with Quartz, following this tutorial . This is my hard-coded
Sorry for stupid questions, I'm doing everything as described in this tutorial: http://www.functionx.com/visualc/howto/calldlgfromdlg.htm I
Doing the getting started of Sinatra. I get this error: ./sinatra.rb:5: undefined method `get'
I am trying to follow the Android mapping tutorial and got to this part
Hey, in a tutorial C++ code, I found this particular piece of confusion: PlasmaTutorial1::PlasmaTutorial1(QObject

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.