Const
The Sound Looped Event.
This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they loop during playback.
Listen to it from a Sound instance using Sound.on('looped', listener), i.e.:
Sound.on('looped', listener)
var music = this.sound.add('key');music.on('looped', listener);music.setLoop(true);music.play(); Copy
var music = this.sound.add('key');music.on('looped', listener);music.setLoop(true);music.play();
This is not to be confused with the [LOOP]Phaser.Sound.Events#event:LOOP event, which only emits when the loop state of a Sound is changed.
The Sound Looped Event.
This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they loop during playback.
Listen to it from a Sound instance using
Sound.on('looped', listener), i.e.:This is not to be confused with the [LOOP]Phaser.Sound.Events#event:LOOP event, which only emits when the loop state of a Sound is changed.