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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:44:07+00:00 2026-05-23T03:44:07+00:00

I have some object, which extends movie clip: public class MyClass extends MovieClip {

  • 0

I have some object, which extends movie clip:

public class MyClass extends MovieClip { ... }

Now, I want to put two of this in the stage:

var obj:MyClass = new MyClass();
addChild(obj);

That would put one, but the other I want it to be exactly the same as the first, so I just need to add a “reference” of obj to the stage, along with obj itself.

In the end, I want two objects of type MyClass doing the same thing in the stage. If I try to simply do:

var obj2 = obj;
addChild(obj2);

only obj2 will appear in the stage.

How could I achieve that with references? (in order to save memory and CPU time (it is really important))

Thanks in advance!

  • 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-23T03:44:08+00:00Added an answer on May 23, 2026 at 3:44 am

    There isn’t really a good way to do what you want to do. From what I’m reading, you want two objects on the stage….but you want them to do the same thing on the stage, so you actually want only one object.

    By design, an object on the display list only has one location. If you have more than one location at the same time, you’ll need two objects. There is, however, another way to do this that involves blitting, but you’d have to put the framework in place….but, you can use one object and copy them to multiple places on your stage. If this is the way you want to go, there’s a tutorial here.

    Good luck.

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

Sidebar

Related Questions

I have two classes: the parent class A and some subclass B, which extends
I have an ActiveX object which extends some functions. I have a web page
I have a class and its companion object which together have some reusable functionality.
I have some objects which will be used in the same manor. This object
I have some code, which uses the ExecuteStmt method on the Axapta Object when
I have an object config which has some properties. I can export this ok,
I have created some python code which creates an object in a loop, and
I have a list of objects, some of which can be null. I want
I have a class: public class MyClass<T> { public string TestProperty { get; set;
I have created a class called SimpleCanvas which extends the JPanel class, and I

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.