2 Replies Latest reply on Apr 17, 2010 8:09 PM by david.t.lanton

    Incrementing the variable NAME


      To create 10 buttons, you don't have to manually create them (button1, button2, button3, etc.), it's possible instead to create them using a for loop,

      for (var i:int = 0;  i < 10; i++){

      //create a new button with name button+(i)



      Can someone refresh my memory what would be the right syntax for naming the new button so that the maes are just incremented?