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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:02:31+00:00 2026-06-05T20:02:31+00:00

This problem seems very simple to me, but I’ve been unable to fix it,

  • 0

This problem seems very simple to me, but I’ve been unable to fix it, or find an answer anywhere.

This is in a class constructor for a class called block, block_maker is the object that called the constructor, an instance of level.

this.bitmap = new Bitmap(this.bitmap_data);

this.addChild(this.bitmap);     

this.block_maker.stage_foreground.addChild(this);

In level, stage_foreground is added to the stage, but nothing appears. trace(stage_foreground.numChildren); shows the correct count of children, and var temp = (this.stage_foreground.getChildAt(0)); trace(temp.numChildren); correctly but the children OF the children don’t actually show up, the stage just stays blank.

When I change the above code to

this.bitmap = new Bitmap(this.bitmap_data);

this.block_maker.stage_foreground.addChild(this.bitmap);

the blocks appear on the stage, as children of level_instance.stage_foreground, but with this method, the bitmaps aren’t appropriately positioned, as they have no position data. I can simply give this.bitmap x and y positions, and it works, but I am curious as to why it won’t work when just adding the bitmap as a child to the block and then adding that as a child to stage_foreground.

I’ve tried replacing this.bitmap with a number of other object classes, such as a temporary MovieClip I made, or a Shape, but nothing shows up, so I know it has nothing to do with it being a Bitmap.

  • 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-05T20:02:33+00:00Added an answer on June 5, 2026 at 8:02 pm

    As you stated

    This is in a class constructor for a class called block, block_maker
    is the object that called the constructor, an instance of level.

    this.bitmap = new Bitmap(this.bitmap_data);
    this.addChild(this.bitmap);     
    this.block_maker.stage_foreground.addChild(this);
    

    The level class needs to to extend a display object for it to show up.
    In other words

    "this"

    has to be a display object or extend it in some form.

    The reason this doesn’t work.

    this.block_maker.stage_foreground.addChild(this);
    

    and this does

    this.block_maker.stage_foreground.addChild(this.bitmap);
    

    Is because "this" is not a display object but "this.bitmap" is.

    The DisplayObject class is the base class for all objects that can be placed on the display list.

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

Sidebar

Related Questions

This may be a very simple problem, but I couldn't find an answer googleing
This seems like a very simple problem, but I cannot get a scrollbox to
I'm aware this is probably a very simple problem with a 1-line-of-code answer but
On the face of it, this seems a very simple problem but for some
This one seems to be a simple problem, but I can't make it work
My problem seems to be very simple but I'm stuck here. I have a
Ok, this seems simple but I can't find a solution to save my life.
EDIT: This seems to be a problem with IE exclusively. Very simple to re-create,
I know this is a very simple question but I have been struggling with
This problem seems very simple, however I cannot get this to work. I have

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.