Can I group objects to apply functions more simply?
I have sets of movie clips and buttons (we can call them mc1, mc2 and btn3 for now), and I would like to be able to hide or show them all at once. Right now I have functions where I apply visibility changes to them one at a time, where the function contains
mc1.visible = false;
mc2.visible = false;
btn3.visible = false;
It works fine that way. However, for various reasons (including that my groupings have many more than 3 objects) it would be much better if I could define a group once (say "group1", containing mc1, mc2 and btn3) and apply things to them all at once, where group1.visible = false would be equivalent to the above code.
Because of other pieces of my code and the way I need to group them with some overlap (think venn diagram), it does NOT make sense to combine these objects into a movie clip called "group1" and then show/hide them all at once that way.
Is there any way I can do this, or will I have to keep writing stupidly long functions? Why it sucks is that right now if I want to add something to the hypothetical group 1, I have to find every function I try to apply to that grouping and add my btn or movieclip to the list. It would be great if I could just designate it as part of group1, and then any functions I have applied to group1 would affect it too.
Hopefully this makes sense. It just seems like there has to be a better way, but maybe there isn't.