Hello everyone, i am having problems with stopping my main background music on the menu screen. The music starts when the scene loads up and i want the music to stop once i click the button to go to the next scene but the music just keep playing. I have looked at the audio tutorial but it does not show how to stop a sound so i looked up threads on here and saw that someone else had this same issue so i tried the things that were stated there but none of it is working. Can anybody help me with this? Thanks.
The forum is read-only. New threads, replies and edits are disabled.
Can't get audio to stop when loading up the next scene.
All 3 Comments
Hi
Not sure what you've tried, but this is how I normally do it...
When I play a long sound, e.g. some background music, I store a reference to it in the wade.app object, so it remains accessible from everywhere.
wade.app.soundtrack = wade.playAudio('soundtrack.ogg');Then when it's time to stop the music (so before loading the next scene):
wade.stopAudio(wade.app.soundtrack);Does this work for you?
Thanks for responding Gio, where can i find wade.app object? Or do you mean a particular object that i have on the scene?
Nevermind, i figured it out... Thanks for all your help Gio.

