1 Reply Latest reply on May 4, 2006 12:39 PM by TimSymons

    radio button label

    veiky Level 1

      I have 3 radiobuttons(radio0,radio1,radio2)on the stage.I am trying to concatinate name of radio button(i.e. "radio" with value of i)_ with the value of i and etting error.
      I am adding values to radiobutton labels through xml.

      This is the code:

      function loadRadio():Void
      var radioval:String;
      var try1:String;
      for(var i:Number=0; i<=RootNode.childNodes.length; i++)
      // I am getting all the values in variable called radioval, but the problem is how will i add these values to radio button labels.
      //radio + value of i=radioval;....this is just to make u understand
        • 1. Re: radio button label
          Instead of:

          radio+1.label = radioval;


          this["radio"+i].label = radioval;

          This will set the label of the each radio button (radio0, raio1, radio2, etc) to the current value of radioval. If I have misunderstood your question please let me know.