SteveB Posted May 6, 2014 Share Posted May 6, 2014 Any idea why I can't get the game onBlur to fire. I intended to use it to stop background music playing when the game loses focus. I've cut everything down to this:game.onBlur.add(function() { console.log("BLURRED");}, this);I can see that the game object has the signals added but the function never gets called. Have I missed something? Link to comment Share on other sites More sharing options...
SteveB Posted May 6, 2014 Author Share Posted May 6, 2014 Ok, found it. My boot.js had the line:this.stage.disableVisibilityChange = true;which I think came from one of the templates. That stops the onBlur firing. I thought it only stopped the onPause event. Link to comment Share on other sites More sharing options...
Recommended Posts