• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

for loop with movieclips

Community Beginner ,
Dec 22, 2011 Dec 22, 2011

Copy link to clipboard

Copied

Hello:

I have twenty movieclips on stage with these names:

g1

g2

g3

g4

....

How can I make invisible with a for loop, like

for (i = 1; i < 20; i++)

    {

      g+i.visible=false;       

    }

this that not work.

Can you help me, please?

TOPICS
ActionScript

Views

532

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 22, 2011 Dec 22, 2011

for ( var i:int = 1; i < 20; i++)

    {

      this["g"+i].visible=false;       

    }

Votes

Translate

Translate
Community Expert ,
Dec 22, 2011 Dec 22, 2011

Copy link to clipboard

Copied

LATEST

for ( var i:int = 1; i < 20; i++)

    {

      this["g"+i].visible=false;       

    }

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines