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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:55:06+00:00 2026-06-04T20:55:06+00:00

I do ActionScript 3.0 programming and I know that very well. I have a

  • 0

I do ActionScript 3.0 programming and I know that very well. I have a project with ActionScript 2.0 and I got a simple problem for adding instances to the stage. In ActionScript 3.0 when I want to add multiple instances to some Movie Clip, first I save them in an array and then I work with that array to set X and Y and width and alpha and other details.

example:

” itemBlock ” is my instance which is an exported movieclip in library.

for ( var i = 0 ; i < 24 ; i++ ) {
blockBANK[i] = new itemBlock(); // itemBlock is an exported movieclip in the library. 
blockBANK[i].x = // some calculation;
blockBANK[i].y = // some other calculation;
mainPage_mc.addChild(blockBANK[i]); // add to the mainPage_mc  holder
}

and now I can use this array to add and edit my instance everywhere in my AS3 code.
In AS2 I try these but not working and also NO compiler error !

for (var i=0;i<7;i++) { 
    var temp:MovieClip = new MovieClip();
    temp.attachMovie("itemBlock "," itemBlock "+i,0); 
    textboxBANK[i].addChild(temp);
    textboxBANK[i]._y = 40; 
    textboxBANK[i]._x = i * 20; 
    mainPage_mc.addChild(textboxBANK[i]);// add to holder
}

not working and no compiler error

for (var i=0;i<7;i++) { 
    var temp:MovieClip = new MovieClip();
    temp.attachMovie("itemBlock","itemBlock"+i,0); 
    textboxBANK[i].attachMovie(temp);
    textboxBANK[i]._y = 40; 
    textboxBANK[i]._x = i * 20; 
    mainPage_mc.attachMovie(textboxBANK[i]);// add to holder
}

not working again and no compiler error ..

How I put instances in an array and add them to a holder FROM that array in AS2 ?

  • 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-04T20:55:07+00:00Added an answer on June 4, 2026 at 8:55 pm

    As far as I know, you create a new MovieClip in AS2 using the createEmptyMovieClip method. Also, the addChild method is not supported in AS2.

    The AS2 display list is quite different from the AS3 one. A display object only exists when it is on the stage (unlike AS3, where you can traverse the display tree with a stored DisplayObject). In short, if you’re trying to store MovieClips in an array, to add to the stage later, it isn’t possible.

    What you’ll need to do is add them to the stage, and mess with their *_visible* property. Then make them visible at a later stage. Here’s some code, based on what I understand you to be wanting to do…

    var tempClips:Array = new Array();
    
    for(var i = 0; i < 10; i++){
    
        var temp = mainStage.createEmptyMovieClip("temp"+i, mainStage.getNextHighestDepth());
    
        var temp_inner = temp.attachMovie("exportedLibrarySymbol", "temp_inner", temp.getNextHighestDepth());
    
        temp._visible = false; //or true if you want them to be seen instantly
    
        temp._x = someCalculation;
        temp._y = someCalculation;
    
        tempClips.push(temp);
    
    }
    

    Be aware that, in AS2, if you try and add something to the stage at the same depth, the original display object will disappear. Use the getNextHighestDepth method to exact the correct integer.

    A much better description of what you’re trying to do would be very helpful.

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

Sidebar

Related Questions

Still programming an iPad game in Actionscript 3, I am encountering a problem that
I'm starting with programming actionscript and have a simple flow question related to flash.
I'm very new to ActionScript/Flex programming. I have Flex 4.6 and the last Flare.Prefuse
I noticed that when programming a simple motion in ActionScript (e.g. object.x += 5)
For Actionscript 2.0 Let's say this page www.example.com/mypage returns some html that I want
Does Actionscript have a function that would tell me what number the input is
In ActionScript 3 (Flash's programming language, very similar to Java - to the point
Every programming language I know (Perl, Javascript, PHP, Python, ASP, ActionScript, Commodore Basic) uses
I have recently started doing some ActionScript/Flex programming and I am... Surprised... By the
I have vast programming knowledge; C++/C#/ActionScript/ASM/PHP..... so learning the language of SilverLight itself isn't

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.