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