An abstract base class for IEffectContext implementations.

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

.

See also:

Variables

read onlyduration:Float

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

Available since

1.0.0

.

read onlyease:IEasing

The easing function to use for animation.

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

private@:dox(show)cleanupEffect():Void

Called when the effect completes or is interrupted. Subclasses may override this method to customize the effect's behavior.

Available since

1.0.0

.

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

.

private@:dox(show)prepareEffect():Void

Called when the effect is initialized. Subclasses may override this method to customize the effect's behavior.

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:

private@:dox(show)updateEffect():Void

Called when the effect's position is updated. Subclasses may override this method to customize the effect's behavior.

Available since

1.0.0

.