Phaser API Documentation

  Version: 
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Event: TIMELINE_LOOP
Phaser.Tweens.Events.TIMELINE_LOOP
TIMELINE_LOOP

Description:

The Timeline Loop Event.

This event is dispatched by a Tween Timeline every time it loops.

Listen to it from a Timeline instance using Timeline.on('loop', listener), i.e.:

var timeline = this.tweens.timeline({
    targets: image,
    ease: 'Power1',
    duration: 3000,
    loop: 4,
    tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]
});
timeline.on('loop', listener);
timeline.play();

Parameters:

name type description
timeline Phaser.Tweens.Timeline

A reference to the Timeline instance that emitted the event.

Since: 3.0.0