Let’s say I have a bunch of movieclips like this:
_level0.mainmenu.item0_mc
_level0.mainmenu.item1_mc
_level0.mainmenu.item2_mc
_level0.mainmenu.item3_mc
_level0.mainmenu.submenu.item0_mc
_level0.mainmenu.submenu.item1_mc
_level0.mainmenu.submenu.item2_mc
_level0.mainmenu.submenu.item3_mc
_level0.mainmenu.submenu.submenu.item0_mc
_level0.mainmenu.submenu.submenu.item1_mc
_level0.mainmenu.submenu.submenu.item2_mc
_level0.mainmenu.submenu.submenu.item3_mc
etc.
every movieclip has a attached variable (“expanded”) like this:
_level0.mainmenu.item1_mc.expanded == true
which can be set to true or false.
Each movieclip has a function attached to it that needs to know if any of it’s siblings (i.e item1_mc, item2_mc etc) have their “expanded” variable set to ‘true’.
What would be the easiest way to find that out? There can be any number of movieclips and any number of submenus.