Gives a component the ability to control an effect.

Events:

openfl.events.Event.CHANGE

Dispatched when the effect's position is updated.

openfl.events.Event.COMPLETE

Dispatched when the effect has completed.

Available since

1.0.0

.

Variables

read onlyduration:Float

The total running time of the effect, measured in seconds.

Available since

1.0.0

.

position:Float

The current position of the effect, in the range of 0.0 to 1.0.

Available since

1.0.0

.

See also:

read onlytarget:Dynamic

The effect's target object, which may be modified in some way, such as animating one of the target's properties.

Available since

1.0.0

.

Methods

interrupt():Void

Interrupts the playing effect, but it will be allowed to determine on its own whether this call behaves like stop() or if it behaves like toEnd() instead.

Available since

1.0.0

.

See also:

pause():Void

Pauses an effect that is playing at the current position.

Available since

1.0.0

.

play():Void

Starts playing the effect from the current position.

Available since

1.0.0

.

playReverse():Void

Starts playing the effect from its current position back to the beginning (completing at a position of 0.0).

Available since

1.0.0

.

stop():Void

Stops the effect at its current position and forces Event.COMPLETE to be dispatched.

Available since

1.0.0

.

See also:

toEnd():Void

Advances the effect immediately to the end and forces Event.COMPLETE to be dispatched.

Available since

1.0.0

.

See also: