Red Spark Posted July 9, 2014 Share Posted July 9, 2014 Hello there! My music cue has two parts in it - an intro and a loop. I want to start playing the loop part once the intro is finished, and for that I'm using onMarkerComplete and a lambda expression.Here is TypeScript code:private musicStart ():void{ var music:Phaser.Sound; music = this.game.add.audio ('Music'); music.addMarker ('intro', 0, 9.06); music.addMarker ('loop', 9.06, 59.53); music.play ('intro', 0, 1, false); music.onMarkerComplete.add (() => { music.play ('loop', 0, 1, true); });}And identical JS code:var music:Phaser.Sound;music = this.game.add.audio ('Music');music.addMarker ('intro', 0, 9.06);music.addMarker ('loop', 9.06, 59.53);music.play ('intro', 0, 1, false);music.onMarkerComplete.add (function (){ music.play ('loop', 0, 1, true);});It seems to work fine - the intro gracefully switches into the loop part. But that part is played only once, despite having explicit 'true' for looping. It is a bug or a feature? How do I stack sounds one after another? Link to comment Share on other sites More sharing options...
Red Spark Posted July 14, 2014 Author Share Posted July 14, 2014 The bump of hope Link to comment Share on other sites More sharing options...
Riddik Posted July 22, 2014 Share Posted July 22, 2014 I have the same problem. Do you solved it? While soundtrack was in separate file, all works fine. But once unite all sounds in one audio sprite, loop play stopped working. Link to comment Share on other sites More sharing options...
Recommended Posts