Can someone advise how to stop the background music from the first layout and start the music for the second layout at the same time? My project just keeps playing the first layout/level music all the way through.
It bugged me that this wasn't directly answered...
The simple answer is:
On Touch/Mouse ~ Audio ~ Stop "MenuBGM"
The slightly less simple answer:
Here's an ordinary scenario- you have a menu select screen, and when you click on Level 1-1, you want
1. The Menu Layout to go away, and
2. For Level 1-1 to load WITHOUT having the Menu music still playing.
I sometimes have a problem putting audio commands inside of "On End of Layout" Actions, so I put the Stop "MenuBGM" Action AND the Go To Layout Action in the button.
More specifically, I create a sprite called MenuSelect, and attach the various kill commands to that button.
That way, I can make a menu with several level options, each one leading to a different layout. The MenuSelect Sprite is then used to "Highlight" the various levels, and whenever the player "clicks" on the level they want to go to, they're actually clicking a conditional MenSelect button. That way you get your kill switch without having to rely on the On End of Layout condition, which doesn't always provide the expected result.
But I'm still learning, too!