1 Reply Latest reply on Aug 24, 2007 12:56 PM by DominicV

    linkButton from array

    chriskeeler2
      I have an array of letters (the alphabet) and want to create a row of linkButtons using the array data. So the display will have a row of letters that are clickable. Array created in AS and is named 'alphabet'

      Your help is appreciated.
      Thank you.
      -Christopher Keeler
        • 1. Re: linkButton from array
          DominicV Level 1
          Sounds like the best way to do this is in actionscript using a for each loop. Then within the loop create the linkbutton controls and add them dynamically.

          Something like :
          for each (var value:* in object){
          var lnkBtn:LinkButton = new LinkButton();
          lnkBtn.label = value.toString();
          ... additional lnkBtn properties
          this.addChild(lnkBtn);
          }