Open and close action with single button
On my HTML5 Canvas stage I have several buttons that perform different actions such as opening an information box, or even a sub-menu. I'm trying to code it so that when a button is clicked it not only opens the relevant action, but it also closes any other actions that were already opened. Furthermore, if the same button is clicked again it will close its own action.
Is there a function that exists to do this? Thanks, appreciate any help - I'm obviously new and trying my hardest to learn it!
My current process for opening is
this.mc_Contact_Box.visible = false;
this.Contact_Btn.addEventListener("click", fl_ClickToShow_4.bind(this));
function fl_ClickToShow_4()
{
this.mc_Contact_Box.visible = true;
}
