I have many buttons on my stage about 45 for interaction. The idea is when you press a button it goes to frame2 of its movie clip and lights up.
I then have a reset button which reverts all buttons to the frame 1 state.
I End up having so many lines of code and i believe it could be shortened with a for loop. This is what I have for my Reset code.
e.g.
MovieClip(Btn1).gotoAndStop(“1”);
MovieClip(Btn2).gotoAndStop(“1”);
MovieClip(Btn3).gotoAndStop(“1”);
MovieClip(Btn4).gotoAndStop(“1”);
MovieClip(Btn5).gotoAndStop(“1”);
MovieClip(Btn6).gotoAndStop(“1”);
-Theres about 45 of these.
Is it possible to change select my variable with a for loop.
e.g.
for (var i:Number = 0; i<46, i++)
{
MovieClip(Btn"i").gotoAndStop(“1”);
}
Any help would be great thanks