Any number of checkboxes unhides a button, rehides it when not selected
Hi there! I am attempting to code a set of checkboxes to unhide a button when they are checked. It's not a 1:1 correlation, so in my sample that I'm playing with, I have Check1, Check2, Check3, Check4, Check5. If Checks 1, 3, or 5 are checked, I want Button1 to unhide. If all 3 of those checkboxes are unchecked, I want Button1 to hide again. I have been fiddling with the code, and I thought this was the answer, but it's not functioning correctly (it's set as a Mouse Up event) and now I'm stuck. Thanks in advance for your assistance!
var r1 = this.getField("Check1").valueAsString;
var r2 = this.getField("Check3").valueAsString;
var r3 = this.getField("Check5").valueAsString;
if (event.r1 != "Off" || event.r2 != "Off" || event.r3 != "Off") {
this.getField("Button1").display = display.visible ;
} else {
this.getField("Button1").display = display.hidden ;
}