I have a series of movie clip buttons, b1, b2, b3, etc…
when someone clicks on say, b1, all the buttons after it (b2, b3, b4) move.
if they click on b2, then b3, b4, b5…etc, move
I have the code working, but I’m wondering if there is a better way to write it (especially if I add more movie clips later say, b6…b7…b8…)
note: (btn_overHeight-btn_height) = the distance I want the buttons to shift over…
if (this == b0) {
b1._y += btn_overHeight-btn_height;
b2._y += btn_overHeight-btn_height;
b3._y += btn_overHeight-btn_height;
b4._y += btn_overHeight-btn_height;
} else if (this == b1) {
b2._y += btn_overHeight-btn_height;
b3._y += btn_overHeight-btn_height;
b4._y += btn_overHeight-btn_height;
} else if (this == b2) {
b3._y += btn_overHeight-btn_height;
b4._y += btn_overHeight-btn_height;
} else if (this == b3) {
b4._y += btn_overHeight-btn_height;
}
};