# If statment help for mutiple selected radio buttons

**URL:** <https://forum.kirupa.com/t/if-statment-help-for-mutiple-selected-radio-buttons/332487>\
**Category:** flash\
**Created:** [June 26, 2014, 11:34pm UTC](https://forum.kirupa.com/t/if-statment-help-for-mutiple-selected-radio-buttons/332487 "2014-06-26T23:34:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Medina](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@Josh\_Medina](https://forum.kirupa.com/u/Josh_Medina)\
**Post date:** [June 26, 2014, 11:34pm UTC](https://forum.kirupa.com/t/if-statment-help-for-mutiple-selected-radio-buttons/332487/1 "2014-06-26T23:34:32Z")

</div>

Hello fellow flashers, I need some help with if statements.

I’m building a flash banner with CS6/AS2 that has 4 radio buttons that once the user rolls over, they mark with a checkmark. I want the user to only be able to select 2 of the 4 at any time.

My current set up:

- One movie clip that stores the Check on/off (checkmark\_mc) 4 instances of this
- 4 inviz buttons that control the check on/off

Code that drives this:  
Checkmark\_mc has two vars stored (var checkmarked = false; and var checkmarked = true)  
buttons each have this:  
**on(rollOver){  
if(checkmark.checkmarked == false){  
checkmark.gotoAndStop(2);  
}  
if(checkmark.checkmarked == true){  
checkmark.gotoAndStop(1);  
}  
}**

Question:  
how do I code this so when the user makes their 2 selections, the other radios no longer function unless they are checked off?

thank you!!
