Skip to main content
October 23, 2006
Question

Movie Clips in Array

  • October 23, 2006
  • 5 replies
  • 348 views
I am trying ot push attached Movieclips into an Array

btnUp.onRelease = function():Void {

var grp1:MovieClip = test.attachMovie("Group1", "mcOne", 1);
myarray.push(grp1);

}

I think this works.

What I am trying to do is that after the user select the movieclips he or she wants (40 choices total) they will be pushed into an array and that when they select finished choosing the movieclips will appear in order in which they chose them in another frame or movieclip. But when it comes to arrays I am clueless.
This topic has been closed for replies.

5 replies

kglad
Community Expert
Community Expert
October 25, 2006
you're welcome.
October 24, 2006
Your the best, thanks
kglad
Community Expert
Community Expert
October 24, 2006
the code to display the selected movieclips (in order) is after the comment.

when you're ready to start the display, set index=0 and use that code after the comment.

to have those movieclips appear at a designated _x,_y assign myarray[index]._x and myarray[index]._y to suit your needs.
October 24, 2006
Thank you very much, I wasn't sure how to not have the MC not show up.

The next thing I am looking for is that on a seperate MC a place of some sort will be replaced by the mc's pushed into the array. So no matter what mc is pushed in first it wil appear and replace the top place holder.
kglad
Community Expert
Community Expert
October 24, 2006
when btnUp is released you're going to be displaying grp1. i infer that's not what you want, at that time, so you should use: