SmartGames

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. The problem was that i destroyed everything in the state i left when switching states by calling this.game.state.clearCurrentState(). But nevermind, i switched to Howler.js for audio, also because loading more than one audio file and then trying to play one of them was crashing Internet Explorer, even with audio sprites...
  2. Hey all, i've noticed a weird behaviour from the soundManager. The loop of an audio sprite's marker gets broken after switching states. So to further help explain my problem, this is how i am doing things: // start preload state this.load.audio("audioSprite", ["assets/audio/audioSprite.mp3", "assets/audio/audioSprite.ogg"]); then when onLoadComplete gets called: this.game.audioSprite = this.game.add.audio("audioSprite");this.game.audioSprite.allowMultiple = true; this.game.audioSprite.addMarker("themeSong", 0, 19.2, 1, true); //(key, startingPoint, duration, volume, loop)and 7 more markers//end preload state //start menu statethis.game.audioSprite.play("themeSong");//end menu state As long as i do not switch states, the "themeSong" will continue to play and loop, but if i switch state to, say levelSelect,the "themeSong" will continue to play to the end of the specified duration but will not loop!? Any help is appreciated