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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:47:01+00:00 2026-05-13T15:47:01+00:00

I am a little confused. I made a button symbol and I put a

  • 0

I am a little confused. I made a button symbol and I put a textbox called “butLabel”. this button is encapsulated into another movieclip called MainMenu. cbegin is the instance name I gave the button. If I trace like this….

trace(menu.cbegin);

It recognizes cbegin is a button. but if I trace it like this

trace(menu.cbegin.butLabel);

it says butLabel is null. Below is how I call on the Menu movieclip

var menu = new MainMenu();
trace(menu.cbegin.butLabel);
menu.x = sr.stageWidth/2;
menu.y = sr.stageHeight/2;

Again, the button works, but the label inside of the button doesnt. textfield is set to dynamic and I copied and pasted the name that was in the instance name field, into my code. so they have to be the same. I also went about typing the word button into the text field by default from the library, and it seems to work fine but if I alter the textfield via code, it doesn’t work. Any suggestions as of what is going on ?? Thanks!

  • 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-13T15:47:01+00:00Added an answer on May 13, 2026 at 3:47 pm

    Here is what you can do, it is sort of hackish.

    NOTE: This assumes the TextField is on the 2nd layer (ie. getChildAt(1)), above the initial layer created when you make a SimpleButton.

    var menu:MainMenu = new MainMenu();
    addChild(menu);
    
    var upStateContainer:DisplayObjectContainer = menu.cbegin.upState as DisplayObjectContainer;
    var butLableUp:TextField = upStateContainer.getChildAt(1) as TextField;
    butLableUp.text = "Up State";
    

    or as a one liner:

    ((menu.cbegin.upState as DisplayObjectContainer).getChildAt(1) as TextField).text = "UP State";
    

    Explanation:
    When flash is compiled from the Flash IDE, all instances of SimpleButton, and their children, are converted to their base display types, like Sprites. Even if you have one textfield on a layer over the button states that spans all four frames, there will be a textfield generated for each of the 3 visible button states. The instance name of the textfield doesn’t even matter and is never used.

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

Sidebar

Related Questions

i have a problem and confused a little bit. I made some research in
Ok, so I'm a little confused as to why I can't find this anywhere,
I'm a little confused on this particular problem and I have had this trouble
I am a little confused in my about permissions, in my dev environment I
I am a little confused on how exactly postScale method calculates the values of
I am a little confused about Accept-Encoding . I have Web Service which would
I'm a little confused by the structure of the Node class in OpenJDK's implementation
I'm a little confused as to how I should be using didSelectRowAtIndexPath . Without
I am a little confused about the roles of a java application server and
I'm a little confused about something. I wrote an app and tested it on

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.