3 Replies Latest reply on Sep 20, 2010 4:41 PM by Ned Murphy

    How to access multiple buttons in a loop??

    aditi_bk Level 1

      Hi,

       

      I have 29 buttons, named img1, img2 ....till img29...I need to access them all in a loop. I had asked this question earlier, but at that time the buttons had to be accessed via their holding movieclip, but this time the code is within the clip, so I need to directly access the button.

       

      So originally the code I was using to access them was

       

      _root.folioholdermc["img"+i]._alpha   //thanks to Ned Murphy

       

      now I need to access them as

       

      this.img2._alpha                          //due to a path change

       

      I tried using

       

      this.img[i]._alpha           but this is not working.

       

      I want to put this in a loop where I moves from 1 to 29. How can I do this?? Any help will be greatly appreciated...im sure the answer is really simple, but I am new to AS, and don't know wat will work.