In my code, I have a menu screen and the actual game. I want different music for both of them, but can't get the menu music to stop when the game music begins. The game music is layered over the menu music.
this is at the beginning of the code
this is used to load menu music
this is used when I exit the menu to go to the game
this is used to load the new music for the game
this is used to stop the sound before returning to the menu after exiting the game.
Every time I switch between the menu and the game it adds another sound on top of the others. I am confused about this.
Global sound Global soundplaying
this is at the beginning of the code
sound = LoadSound("Joes Last Mix.mp3") LoopSound sound soundplaying = PlaySound (sound)
this is used to load menu music
StopChannel soundplaying soundplaying = 0 FreeSound sound sound = 0
this is used when I exit the menu to go to the game
sound = LoadSound("Joes Last Mix digitalized fast.mp3") LoopSound sound soundplaying = PlaySound (sound)
this is used to load the new music for the game
StopChannel (soundplaying) soundplaying = 0 FreeSound (sound) sound = 0
this is used to stop the sound before returning to the menu after exiting the game.
Every time I switch between the menu and the game it adds another sound on top of the others. I am confused about this.