kriket Posted November 4, 2015 Share Posted November 4, 2015 The audiosprite code in this game is a complete clone of a game I worked on previously and that didn't have this issue. I have been through every line of that as well as this, and everything matches, even the version of phaser (2.3, I am not using 2.4 for other reasons), but this one has the audiosprite issue where instead of one sound playing, all the following sounds follow as well. Try player the game at ice.site44.com , try collecting the gold chest and you will notice after gold sound, other sounds play as well. Code is tiny and simple. Please check code at ice.site44.com in dev tools too. Its small.this.load.audio("sfx", ["assets/audio/output.ogg", "assets/audio/output.m4a"]); this.sound = this.add.audio('sfx');this.sound.allowMultiple = true;// defining the markers// key, the time the sound starts and the duration - in seconds.this.sound.addMarker('fireworks', 0, 6);this.sound.addMarker('single_nugget', 7, 8);this.sound.addMarker('Game_Start', 9, 12);this.sound.addMarker('Fail_02B', 13, 16);this.sound.addMarker('explosion_5', 18, 19); checkOverlapGold: function(body1, body2) { this.sound.play('single_nugget'); } Link to comment Share on other sites More sharing options...
Skeptron Posted November 4, 2015 Share Posted November 4, 2015 From the doc : addMarker(name, start, duration, volume, loop) So if "single_nugget" starts at 7 end lasts 8 seconds, it will end at 15s. That is, after "Game_start" and during "Fail_02B". kriket 1 Link to comment Share on other sites More sharing options...
Recommended Posts