# Need help deselecting a RadioButton component

**URL:** <https://forum.kirupa.com/t/need-help-deselecting-a-radiobutton-component/247001>\
**Category:** Uncategorized\
**Created:** [December 17, 2007, 5:30pm UTC](https://forum.kirupa.com/t/need-help-deselecting-a-radiobutton-component/247001 "2007-12-17T17:30:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sosuke](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sosuke](https://forum.kirupa.com/u/sosuke)\
**Post date:** [December 17, 2007, 5:30pm UTC](https://forum.kirupa.com/t/need-help-deselecting-a-radiobutton-component/247001/1 "2007-12-17T17:30:29Z")

</div>

I can’t seem to figure out how to set the selected state of a RadioButton component to false. As mentioned in the comments here [http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/RadioButton.html](http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/controls/RadioButton.html) it has been done by design to ignore the call for false on the RadioButton component! I have tried changing the name of the group for the elements and even doing a removeChild and then addChild again to try and get them to reset to unselected. I had originally wanted to reuse the same elements on stage for each question but the way it looks now I will have to create a set of RadioButtons for each question in my quiz which feels awfully wasteful.

Any ideas how I can go about deselecting RadioButton components?

```auto
//does not work
answer1.selected = false;
removeChild(answer1); //successfully removed
addChild(answer1); //returns to the stage with the selected state of true

```

See a direct snippet from the RadioButton.as file that says you can’t set it to false. :!:

```auto
/**
 * @private (setter)
 *
 * @langversion 3.0
 * @playerversion Flash 9.0.28.0
 */
override public function set selected(value:Boolean):void {
    // can only set to true in RadioButton:
    if (value == false || selected) { return; }
    if (_group != null) { _group.selection = this; }
    else { super.selected = value; }
}

```
