Jump to content

Pause/resume music on game pause


Yora
 Share

Recommended Posts

Via the code below I'm trying to get music to pause when the game pauses (this works) then resume it when the game resumes (doesn't do anything).  I just don't want the games music to be playing while the user is in another browser tab or something like that, but not to have to start over when tabbing back.  If resuming doesn't work I'll make due without, though I could just be going about this the wrong way.  Thanks for any help.  :)

game.onPause.add(function () {            music.pause();        });        game.onResume.add(function () {            music.resume();        });
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...