Using a var to control button states

OK, this is gonna sound elementary... but here goes:

I've got 8 buttons on the stage. Each button displays content on layers assigned to it (8 layers -- 1 for each button).

When a button is clicked and the layer is OPEN, I want the button state to be a different color. I've created a "Selected" state and highighted the button.

When the user closes the layer OR clicks another button, I want the previously selected button to return to its normal state, and the current selected button to highlight.

Is there a way to control this behavior with a variable instead of creating tons of triggers to control the 8 button states across 8 layers?

I created a var called "buttonSelected" but I'm not sure how (or if) I can control a button state with a var.

Any help is mucho appreciated...



here's a screenshot

4 Replies
eLearning Development


you can use a button set to have only one selected state at a time.  Then have two triggers on your close button.  The first sets the state of your button to normal, the second hides the layer.  That way you are covered whether they choose another button or close the help and go back to main sdlide.