Hi people,
i have the following movieclips running
_level0categories0_mc
level0.categories_mc.categorie0_mc.index0_mc
level0.categories_mc.categorie0_mc.index1_mc
level0.categories_mc.categorie0_mc.index2_mc
_level0categories1_mc
level0.categories_mc.categorie1_mc.index3_mc
level0.categories_mc.categorie1_mc.index4_mc
level0.categories_mc.categorie1_mc.index5_mc
_level0categories2_mc
level0.categories_mc.categorie2_mc.index6_mc
level0.categories_mc.categorie2_mc.index7_mc
level0.categories_mc.categorie2_mc.index8_mc
level0.categories_mc.categorie2_mc.index9_mc
level0.categories_mc.categorie2_mc.index10_mc
my question is: when i click a button in …for example…
…_level0categories1_mc… i need to know wich indexe’s there are and hide those movieclips. so in this case index3, index4 and index5
can someone please help me with this?
but there is one small prob… i dont know wich indexe’s there are in the level0.categories_mc.categorie0_mc… now there are three indexes tomorrow there can be 5 indexes
so i need to find out wich indexes there are and then hide those indexes
for(var i in _root){
if(typeof (_root*) == 'movieclip' && _root*.substr(35,5) == "index"){
_root*._visible = false;
//will hide all MCs on root with "index" as substring (35,5)
}
}
for(var i in _root.categories_mc[CatToHideID]){
// trace i result is: index0_mc, index1_mc, index2_mc, title and id
if(typeof (_root.categories_mc[CatToHideID]*) == 'movieclip' && _root.categories_mc[CatToHideID]*.substr(35,5) == "index"){
_root.categories_mc[CatToHideID]*._visible = false;
//will hide all MCs on root with "index" as substring (35,5)
}
}
when if i leave it like this nothing happens, but when i delete