# RadioButtons with textfields

**URL:** <https://forum.kirupa.com/t/radiobuttons-with-textfields/19989>\
**Category:** flash\
**Created:** [May 3, 2003, 7:07pm UTC](https://forum.kirupa.com/t/radiobuttons-with-textfields/19989 "2003-05-03T19:07:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mooler](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mooler](https://forum.kirupa.com/u/mooler)\
**Post date:** [May 3, 2003, 7:07pm UTC](https://forum.kirupa.com/t/radiobuttons-with-textfields/19989/1 "2003-05-03T19:07:49Z")

</div>

Hello again!!!

My problem is that I want to have 3 radio buttons (button1,button2,button3) the change Handler is onChange. Depending on wich button is checked I want a different text string to show in a textfield (textbox1).

Now this is my first time with radiobuttons and I´m still new to AS and this is what I´ve came up with so far.

[AS]function onChange (component); {  
if (component.\_Button1 = true; {  
textbox.text = “button1”;  
}else if (component.\_Button2 = true; {  
textbox.text = “button2”;  
}  
else if (component.\_Button2 = true; {  
textbox.text = “button2”;  
}  
}{[/AS]

But sorry to say it doesn´t work ( well I´m not really suprised ;-))  
Besides that I`d like to have a reset button that resets the textbox and makes the radio buttons all set to false, is that possible?

I´ll attach the fla

Thx
