Howdy all,
Okay so I have some checkboxes that make MCs visible or invisible. I put all my MCs into an array and all the checkbox instance names an array and used the following code (the ChangeHandler function is called showHideShape):
[AS]
function ShowHideShape() {
var c;
for (c in checkbox) {
mainMap.map.pan.mapElements[objects[c]]._visible = checkbox[c].getValue();}
}
[/AS]
This all works great. However, now I need to move all the checkboxes onto their own little MC and for the life of me I can’t figure out how to modify the above to make it work. I tried including the MC name in front of all the checkbox instance names in the array (e.g. checkbox = [MC.cb1, MC.cb2, MC.cb3]) but that didn’t work. I also tried
[AS]
function ShowHideShape() {
var c;
for (c in checkbox) {
mainMap.map.pan.mapElements[objects[c]]._visible = MC[checkbox[c]].getValue();}
}
[/AS]
but that doesn’t work either.
What am i missing here? :trout: Any ideas? :beam: