It looks like you're new here. If you want to get involved, click one of these buttons!
music = Sound.new("sound/page1music.mp3") local channel = music:play(0, 1000) channel:setVolume(1) on fisrt page. And music = Sound.new("sound/page2music.mp3") local channel = music:play(0, 1000) channel:setVolume(1) for second page. Problem When I change page from 1 to 2 the first page sound doesn't stop. And the second one. How can I globally turn off all sounds, for the sound on/off functionality. Thanks |
Comments
Or register to scenemanager's "exitBegin" event to stop playing active music
Thanks a lot
There is most likely a much simpler way to do all that, but it worked for me
I have sound on off button each time that user that that I change "sound" boolean variable from true to false and vice versa.
I need to stop and restart music even user tap that button
How can I do this ?
I am playing and stopping musicS when page added to stage (onAddedToStage) and removed from stage (onRemovedFromStage)