3 Replies Latest reply on Oct 4, 2010 2:38 AM by Alex-Wright

    Accessing DisplayObjects made in a For Loop




      I am making a form based on given data, and so would liek to display a variable number of formitems, and some of the formitems will have a varying number of radiobuttons.


      I would like to know how I can access the formitems (e.g. which radio button is selected), given that they are added to the application in a for loop using the addChild method, and so are not assigned to a constant variable. i.e


      for (f = 1 to numQuestions) {
           for (c = 1 to numRadioButtons) {
                rButton = new RadioButton;
                rButton.label = externalData.getItemAt(c).question_option;


      Thanks in advance,