class motion.Actuate

Class Fields

static var defaultEase:IEasing

static function apply<T>(target:T, properties:Dynamic, ?customActuator:Class<GenericActuator<T>>): GenericActuator<T>

Copies properties from one object to another. Conflicting tweens are stopped automatically @example Actuate.apply (MyClip, { alpha: 1 } );

target

The object to copy to

properties

The object to copy from

customActuator

A custom actuator to use instead of the default (Optional)

returns

The current actuator instance, which can be used to apply properties like onComplete or onUpdate handlers

static function effects(target:DisplayObject, duration:Float, ?overwrite:Bool): EffectsOptions

Creates a new effects tween

target

The object to tween

duration

The length of the tween in seconds

overwrite

Sets whether previous tweens for the same target and properties will be overwritten (Default is true)

returns

An EffectsOptions instance, which is used to select the kind of effect you would like to apply to the target

static function isActive(): Bool

Checks if Actuate has any active tweens

returns

Whether Actuate is active

static function motionPath<T>(target:T, duration:Float, properties:Dynamic, ?overwrite:Bool): GenericActuator<T>

Creates a new MotionPath tween

target

The object to tween

duration

The length of the tween in seconds

properties

An object containing a motion path for each property you wish to tween

overwrite

Sets whether previous tweens for the same target and properties will be overwritten (Default is true)

returns

The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate

static function pause<T>(target:T): Void

Pauses tweens for the specified target objects

...

targets The target objects which will have their tweens paused. Passing no value pauses tweens for all objects

static function pauseAll(): Void

static function reset(): Void

Resets Actuate by stopping and removing tweens for all objects

static function resume<T>(target:T): Void

Resumes paused tweens for the specified target objects

...

targets The target objects which will have their tweens resumed. Passing no value resumes tweens for all objects

static function resumeAll(): Void

static function stop<T>(target:T, ?properties:Dynamic, ?complete:Bool, ?sendEvent:Bool): Void

Stops all tweens for an individual object

target

The target object which will have its tweens stopped, or a generic actuator instance

properties

A string, array or object which contains the properties you wish to stop, like "alpha", [ "x", "y" ] or { alpha: null }. Passing no value removes all tweens for the object (Optional)

complete

If tweens should apply their final target values before stopping. Default is false (Optional)

sendEvent

If a complete() event should be dispatched for the specified target. Default is true (Optional)

static function timer(duration:Float, ?customActuator:Class<GenericActuator<TweenTimer>>): GenericActuator<TweenTimer>

Creates a tween-based timer, which is useful for synchronizing function calls with other animations @example Actuate.timer (1).onComplete (trace, [ "Timer is now complete" ]);

duration

The length of the timer in seconds

customActuator

A custom actuator to use instead of the default (Optional)

returns

The current actuator instance, which can be used to apply properties like onComplete or to gain a reference to the target timer object

static function transform<T>(target:T, ?duration:Float, ?overwrite:Bool): TransformOptions<T>

Creates a new transform tween @example Actuate.transform (MyClip, 1).color (0xFF0000);

target

The object to tween

duration

The length of the tween in seconds

overwrite

Sets whether previous tweens for the same target and properties will be overwritten (Default is true)

returns

A TransformOptions instance, which is used to select the kind of transform you would like to apply to the target

static function tween<T>(target:T, duration:Float, properties:Dynamic, ?overwrite:Bool, ?customActuator:Class<GenericActuator<T>>): GenericActuator<T>

Creates a new tween @example Actuate.tween (MyClip, 1, { alpha: 1 } ).onComplete (trace, [ "MyClip is now visible" ]);

target

The object to tween

duration

The length of the tween in seconds

properties

The end values to tween the target to

overwrite

Sets whether previous tweens for the same target and properties will be overwritten (Default is true)

customActuator

A custom actuator to use instead of the default (Optional)

returns

The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate

static function unload<T>(actuator:GenericActuator<T>): Void

static function update<T>(target:T, duration:Float, ?start:Array<Dynamic>, ?end:Array<Dynamic>, ?overwrite:Bool): GenericActuator<T>

Creates a new tween that updates a method rather than setting the properties of an object @example Actuate.update (trace, 1, ["Value: ", 0], ["", 1]).onComplete (trace, [ "Finished tracing values between 0 and 1" ]);

target

The method to update

duration

The length of the tween in seconds

start

The starting parameters of the method call. You may use both numeric and non-numeric values

end

The ending parameters of the method call. You may use both numeric and non-numeric values, but the signature should match the start parameters

overwrite

Sets whether previous tweens for the same target and properties will be overwritten (Default is true)

returns

The current actuator instance, which can be used to apply properties like ease, delay, onComplete or onUpdate