Some time ago in a Kirupa post i saw a way to abbreviate instance targeting and cut down on the code using a for loop or while loop or something like that, but can’t remember what it was:
so instead of
myMovieclip_mc.btn1_btn.enabled = false;
myMovieclip_mc.btn2_btn.enabled = false;
myMovieclip_mc.btn3_btn.enabled = false;
myMovieclip_mc.btn4_btn.enabled = false;
myMovieclip_mc.btn5_btn.enabled = false;
myMovieclip_mc.btn6_btn.enabled = false;
the shorter version was something like this;
while (myMovieClip_mc) {
btn1_btn.enabled = false;
btn2_btn.enabled = false;
btn3_btn.enabled = false;
btn4_btn.enabled = false;
btn5_btn.enabled = false;
btn6_btn.enabled = false;
}
so I don’t have to type myMovieClip_mc 6 times.
How does that go exactly? Thanks.