0 Replies Latest reply on Aug 31, 2007 5:19 PM by toms@polycom

    adding radio button to buttongroup

    toms@polycom
      I am trying to add a radio button to a group in actionscript but the group never recognizes the addition. Here's a sample:

      var _radioGroup:RadioButtonGroup = new RadioButtonGroup();
      var r:RadioButton = new RadioButton;
      r.groupName = "_radioGroup";

      When I step past the last line and look at the radio button group object then it doesn't show the button added to the group.

      I have also tried the line:
      r.group = _radioGroup;

      but that has the same effect. Interesting that the radio buttons that get added to the group act like they are part of the right group but the group doesn't see them. I have created multiple sets of buttons and they all seem to act correctly based on the group they were created in. In other words, buttons in the same group behave normally and there is no weird interaction between groups.

      So here are my questions:

      Is this the correct way to create buttons and add them to the group?
      How does the group find out about buttons that add themselves to the group?
      Has anyone else tried this?


      Any help is greatly appreciated.

      Tom