I'm trying to create a button to turn sound effects off on another layout but I'm having a little trouble with it. I have three layouts, Menu, Game & Game Over. On my menu i've created two buttons, one to turn the music off and one to turn sound effects off.
My music starts on the start of the Menu layout so the music button is working perfectly and turns the music on or off with no issues.
However my sound button doesn't fulyl work as I want this to just turn off sound that plays on all three layouts. I have sound that plays when a button is pressed which is on the Menu & Game Over layout. I also have sound on my Game layout where it makes a sound when the play jumps. I want my sound button to turn all these sounds off when toggled but I can only seem to make it work for the sounds on the Menu layout.
The way I've done my buttons is when it is set to animation frame 0, the music/sound plays. When it is set to frame 1, it should stop/ mute.
Hope someone can help, ive had various different attempts to solve this but to no avail.
Thabks.