So I’ve been very successful with radios in the past but only using two movie clips, so the code looked like this:
function radioDisplay(component) {
radio = component.getValue();
if (radio == "Blah") {
_root.A._visible = true;
_root.B._visible = false;
} else {
_root.B._visible = true;
_root.A._visible = false;
}
}\
Simple right? But what do I do if I have a whole group of movie clips? Do I have to repeat the code over and over where one is true and all the others are false?
As in:
function radioDisplay(component) {
radio = component.getValue();
if (radio == "A") {
_root.A._visible = true;
_root.B._visible = false;
_root.C._visible = false;
_root.D._visible = false;
_root.E._visible = false;
} else {
_root.B._visible = true;
_root.A._visible = false;
_root.C._visible = false;
_root.D._visible = false;
_root.E._visible = false;
}
}\
etc. etc. for each one? That seems like a major pain. Someone out there must know an easier way?