1 Reply Latest reply on May 17, 2006 4:37 PM by Newsgroup_User

    4 forums - 5 days - No answer...

    MikeMedia2
      I have searched and asked everywhere! Is this really that hard?!?
      And believe me, I continue to try every variation that I can think of.

      I simply want to identify one radio button in the radio group.
      Something like:
      var riteAnswer = radioButton Instance "c" of radioGroup "1"
        • 1. Re: 4 forums - 5 days - No answer...
          Level 7
          MikeMedia2,

          > I have searched and asked everywhere! Is this
          > really that hard?!?

          What's the question?

          > And believe me, I continue to try every variation
          > that I can think of.

          Only the right variation will succeed.

          > I simply want to identify one radio button in the
          > radio group.
          > Something like:
          > var riteAnswer = radioButton Instance "c" of
          > radioGroup "1"

          This one's right out of the Help docs. There are two main references
          for ActionScript: the ActionScript 2.0 Language Reference and the
          Components Language Reference. Since you're dealing with a Component,
          you'll want the latter. In either case, approach the relevant reference
          from the following point of view: A) what sort of object am I looking for?
          and B) what type of functionality am I looking for? For A, the object is a
          radio button, which means you'll look up the "RadioButton class" entry in
          the Components Language Reference. For B, you're looking for a
          characteristic, so you'll look under the Property summary. (Properties are
          characteristics an object has; methods are things an object can do; events
          are things an object can react to.)

          Under the RadioButton class, we see that all RadioButton instances
          (i.e., instances of your RadioButton Component) have a RadioButton.groupName
          property. By default, radio buttons all belong to the radioGroup. So if
          you start a new FLA and drag three radio buttons to the Stage, they'll all
          have the value "radioGroup" in the groupName property in the Property
          inspector.

          You'll also see a RadioButton.selection property in the same class
          entry. This gives you (I quote): "A reference to the currently selected
          radio button in a radio button group. This property can be used with a
          RadioButton instance or a RadioButtonGroup instance." Badda bing!


          David
          stiller (at) quip (dot) net
          Dev essays: http://www.quip.net/blog/
          "Luck is the residue of good design."