Changing opacity of a row of buttons with the click of another button

Hi,

I have created a button with an instance name of ‘ClickMe’ and also five buttons each with thier own instance name (B1-B5). I want to change their opacity to zero onclick preferably as a tween from where they are now in opacity (100%) to the zero. I need some assistance with this.

I know it involves importing classes and creating a function. I also believe I can control the set of 5 buttons with iteration.


ClickMe.onPress = function() {
    
    for (var i=1; i<=5; i++) {
        ['B1_'+i].changeopacity = MyMC!['B1_'+i].changeback;
    }

I know this isn’t how to do it, but is something along the lines of what I need.