Skip navigation
RxMadjack
Currently Being Moderated

For loop and accessing objects by instance name.

May 23, 2012 2:32 PM

Hey guys,

 

What I am trying to do should be very simple, I want to make several movieclip objects not visible by using a for loop.

 

Here is what I currently have...

 

for (var i:Number=1; i<8; i++){

          high[i].visible = false;

}

 

 

 

So I have 8 movieclip objects that have instance names of "high1", "high2", "high3" and so forth up to 8

 

What would be the correct syntax for this line of code to make this work?

 

high[i].visible = false;

 

Thank you.

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points