All examples · Sprites and 2D · As Markdown, for AIs

Tween control

What this example shows

A tween is declared once and played as many times as you like. play() starts it from the beginning, over or halfway. pause() and resume() freeze it and pick it up where it stopped, stop() leaves it where it is (only onStop hears it), finish() sends it to the end value and announces it with onEnd, and reset() puts it back where the play started.

playing is true from play() until it ends or is stopped.

Starting
Starting
—