Phaser API Documentation

  Version: 
Event: LOOPED
Phaser.Sound.Events.LOOPED
LOOPED

Description:

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.:

var music = this.sound.add('key');
music.on('looped', listener);
music.setLoop(true);
music.play();

This is not to be confused with the LOOP event, which only emits when the loop state of a Sound is changed.

Parameters:

name type description
sound Phaser.Sound.WebAudioSound | Phaser.Sound.HTML5AudioSound

A reference to the Sound that emitted the event.

Since: 3.0.0