I’ve got the following code that is adding an event listener to a movieclip. Wondering if I can do this in a loop as I have upward of 20 statements of basically the same thing.
btn_channel1.addEventListener(MouseEvent.CLICK, mute);
btn_channel2.addEventListener(MouseEvent.CLICK, mute);
btn_channel3.addEventListener(MouseEvent.CLICK, mute);
btn_channel4.addEventListener(MouseEvent.CLICK, mute);
btn_channel5.addEventListener(MouseEvent.CLICK, mute);
btn_channel6.addEventListener(MouseEvent.CLICK, mute);
btn_channel7.addEventListener(MouseEvent.CLICK, mute);
btn_channel8.addEventListener(MouseEvent.CLICK, mute);
btn_channel9.addEventListener(MouseEvent.CLICK, mute);
any thoughts?