| Package | org.as3lib.kitchensync.action |
| Class | public class KSTween |
| Inheritance | KSTween AbstractAction flash.events.EventDispatcher |
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | autoDelete : Boolean
autoDelete is a flag that indicates whether the action should be deleted
when it is done executing.
| AbstractAction | |
![]() | delay : int
delay is the time that will pass after the start() method is called
before the action begins.
| AbstractAction | |
![]() | duration : int
duration is the length of time that the action will run.
| AbstractAction | |
![]() | durationHasElapsed : Boolean
Checks to see whether the duration of the action has elapsed and if the _startTime is defined.
| AbstractAction | |
| easingFunction : Function
The function used to interpolated the values between the start and end points.
| KSTween | ||
| easingMod1 : Number
Used to modify the results of the easing function.
| KSTween | ||
| easingMod2 : Number
Used to modify the results of the easing function.
| KSTween | ||
![]() | isPaused : Boolean
Will return true if the action is paused (after pause() has been called).
| AbstractAction | |
![]() | isRunning : Boolean
Will return true when the action is running (after start() has been called).
| AbstractAction | |
![]() | name : String
The human-readable name of this action.
| AbstractAction | |
![]() | offset : int
legacy accessors.
| AbstractAction | |
![]() | pauseTime : Timestamp
The time at which the action was last paused.
| AbstractAction | |
| snapToValueOnComplete : Boolean
Indicates whether the final value for the easing function should snap to the
target _toValue.
| KSTween | ||
![]() | startTime : Timestamp
The time at which the action was last started.
| AbstractAction | |
![]() | startTimeHasElapsed : Boolean
Checks to see whether the start time delay has elapsed and if the _startTime is defined.
| AbstractAction | |
![]() | sync : Boolean
Setting sync to true will cause the action to sync up with real time
even if framerate drops.
| AbstractAction | |
![]() | timeStringParser : ITimeStringParser
[static]
The timeStringParser will determine how strings are parsed into valid
time values.
| AbstractAction | |
| tweenTarget : ITweenTarget | KSTween | ||
| Property | Defined by | ||
|---|---|---|---|
![]() | _autoDelete : Boolean | AbstractAction | |
![]() | _delay : int = 0 | AbstractAction | |
![]() | _duration : int = 0 | AbstractAction | |
| _easingFunction : Function | KSTween | ||
| _easingMod1 : Number | KSTween | ||
| _easingMod2 : Number | KSTween | ||
![]() | _name : String | AbstractAction | |
![]() | _paused : Boolean = false | AbstractAction | |
![]() | _pauseTime : Timestamp | AbstractAction | |
![]() | _running : Boolean = false | AbstractAction | |
| _snapToValueOnComplete : Boolean | KSTween | ||
![]() | _startTime : Timestamp | AbstractAction | |
![]() | _sync : Boolean | AbstractAction | |
| _tweenTarget : ITweenTarget
Represents the values that will be tweened by the tween.
| KSTween | ||
| Method | Defined by | ||
|---|---|---|---|
|
KSTween(target:Object = null, property:String = "", startValue:Number, endValue:Number = 0, duration:Function = 0, delay:* = 0, easingFunction:* = null)
Indicates whether tweened values should snap to whole value numbers or use decimals.
| KSTween | ||
![]() |
addEventTrigger(dispatcher:IEventDispatcher, eventType:String):void
Causes the action to start playing when a specified event is fired.
| AbstractAction | |
![]() |
addTrigger(trigger:AbstractAction):void
Causes the action to start playing when another event completes.
| AbstractAction | |
| KSTween | |||
|
cloneReversed(target:Object = null, property:String = null):KSTween
Creates a new Tween and reverses the start and end values of the target property.
| KSTween | ||
|
cloneWithTarget(target:Object, property:String):KSTween
Creates a copy of this Tween which targets a different object and / or property.
| KSTween | ||
|
Clones the tween with a new tweenTarget.
| KSTween | ||
|
jumpToTime(time:*, ignoreDelay:Boolean = false):void
Moves the playhead to a specified time in the action.
| KSTween | ||
|
kill():void
Clean up references to target
| KSTween | ||
|
newWithTweenTarget(tweenTarget:ITweenTarget, duration:Function = 0, delay:* = 0, easingFunction:* = null):KSTween
[static]
Alternative constructor: creates a new KSTween using an ITweenTarget that you pass into it.
| KSTween | ||
![]() |
pause():void
Causes the action to be paused.
| AbstractAction | |
![]() |
register():void
Adds the action as a listener to the Synchronizer's update event.
| AbstractAction | |
![]() |
removeEventTrigger(dispatcher:IEventDispatcher, eventType:String):void
Removes an event trigger added by addEventTrigger().
| AbstractAction | |
![]() |
removeTrigger(trigger:AbstractAction):void
Removes a trigger added with addTrigger().
| AbstractAction | |
|
reset():void
Stops the tween and sets the target property to the start value.
| KSTween | ||
|
reverse():void
Flips the values for to and from values.
| KSTween | ||
|
Starts the Tween.
| KSTween | ||
![]() |
stop():void
Stops the action from running and resets the timer.
| AbstractAction | |
|
toString():String
Returns either the _id or a description of the tween.
| KSTween | ||
![]() |
unpause():void
Resumes the action at the point where it was paused.
| AbstractAction | |
![]() |
unregister():void
Removes the action as a listener to the Synchronizer's update event.
| AbstractAction | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
complete():void
Call this when the action has completed.
| AbstractAction | |
![]() |
forceUpdate():void
Foreces the onUpdate() method to fire without being triggered by Synchronizer.
| AbstractAction | |
![]() |
onTrigger(event:Event):void
Handler that starts playing the action that is called by a trigger event.
| AbstractAction | |
|
onUpdate(event:KitchenSyncEvent):void
Executes the tween.
| KSTween | ||
| Constant | Defined by | ||
|---|---|---|---|
| EXISTING_FROM_VALUE : Number = -Infinity [static]
Use this property to cause the tween to start from whatever the targetProperty is
set to at the time the tween executes.
| KSTween | ||
| _easingFunction | property |
protected var _easingFunction:Function
| easingFunction | property |
easingFunction:Function [read-write]The function used to interpolated the values between the start and end points.
Implementation public function get easingFunction():Function
public function set easingFunction(value:Function):void
See also
| _easingMod1 | property |
protected var _easingMod1:Number
| easingMod1 | property |
easingMod1:Number [read-write]Used to modify the results of the easing function. This is only used on some functions such as Elastic.
Implementation public function get easingMod1():Number
public function set easingMod1(value:Number):void
| _easingMod2 | property |
protected var _easingMod2:Number
| easingMod2 | property |
easingMod2:Number [read-write]Used to modify the results of the easing function. This is only used on some functions such as Elastic.
Implementation public function get easingMod2():Number
public function set easingMod2(value:Number):void
| _snapToValueOnComplete | property |
protected var _snapToValueOnComplete:Boolean
| snapToValueOnComplete | property |
snapToValueOnComplete:Boolean [read-write]Indicates whether the final value for the easing function should snap to the target _toValue. If set to true, the target property will equal _toValue regardless of the results of the easing function.
The default value is true.
public function get snapToValueOnComplete():Boolean
public function set snapToValueOnComplete(value:Boolean):void
| _tweenTarget | property |
protected var _tweenTarget:ITweenTargetRepresents the values that will be tweened by the tween. KSTween will use a TargetProperty by default.
See also
| tweenTarget | property |
tweenTarget:ITweenTarget [read-write]Implementation
public function get tweenTarget():ITweenTarget
public function set tweenTarget(value:ITweenTarget):void
| KSTween | () | constructor |
public function KSTween(target:Object = null, property:String = "", startValue:Number, endValue:Number = 0, duration:Function = 0, delay:* = 0, easingFunction:* = null)Indicates whether tweened values should snap to whole value numbers or use decimals. If set to true, the results of the easing functions on the target property will be rounded to the nearest integer.
Parameterstarget:Object (default = null) |
|
property:String (default = "") |
|
startValue:Number |
|
endValue:Number (default = 0) |
|
duration:Function (default = 0) |
|
delay:* (default = 0) |
|
easingFunction:* (default = null) |
See also
| clone | () | method |
| cloneReversed | () | method |
public function cloneReversed(target:Object = null, property:String = null):KSTweenCreates a new Tween and reverses the start and end values of the target property.
Parameterstarget:Object (default = null) — - The optional target object of the new Tween
|
|
property:String (default = null) — - The optional property to tween with the new Tween.
|
KSTween |
See also
| cloneWithTarget | () | method |
public function cloneWithTarget(target:Object, property:String):KSTweenCreates a copy of this Tween which targets a different object and / or property. This is mostly used as a convenient way to reuse a tween, e.g. in a sequence.
Parameterstarget:Object — - The new object to target. Defaults to the same target as this.
|
|
property:String — - The new target object's property to target. Defaults to the same property as this.
|
KSTween —
Tween - a copy of this tween with a new target/property.
|
See also
| cloneWithTweenTarget | () | method |
public function cloneWithTweenTarget(tweenTarget:ITweenTarget):KSTweenClones the tween with a new tweenTarget.
ParameterstweenTarget:ITweenTarget |
KSTween |
| jumpToTime | () | method |
public function jumpToTime(time:*, ignoreDelay:Boolean = false):voidMoves the playhead to a specified time in the action. If this method is called while the action is paused, it will not appear to jump until after the action is unpaused.
Parameterstime:* — The time parameter can either be a number or a parsable time string. If the
time to jump to is greater than the total duration of the action, it will throw an IllegalOperationError.
|
|
ignoreDelay:Boolean (default = false) — If set to true, the delay will be ignored and the action will jump to
the specified time in relation to the duration.
|
— If the time to jump to is longer than the total time for the action.
|
| kill | () | method |
public override function kill():voidClean up references to target
| newWithTweenTarget | () | method |
public static function newWithTweenTarget(tweenTarget:ITweenTarget, duration:Function = 0, delay:* = 0, easingFunction:* = null):KSTweenAlternative constructor: creates a new KSTween using an ITweenTarget that you pass into it.
ParameterstweenTarget:ITweenTarget — An explicitly defined tweenTarget object that contains the values you want to tween.
|
|
duration:Function (default = 0) — - the time in frames that this tween will take to execute.
|
|
delay:* (default = 0) — - the time to wait before starting the tween.
|
|
easingFunction:* (default = null) — - the function to use to interpolate the values between fromValue and toValue.
|
KSTween —
A new KSTween object.
|
| onUpdate | () | method |
protected override function onUpdate(event:KitchenSyncEvent):voidExecutes the tween.
Parametersevent:KitchenSyncEvent |
| reset | () | method |
public function reset():voidStops the tween and sets the target property to the start value.
| reverse | () | method |
public function reverse():voidFlips the values for to and from values. Essentially, causes the animation to run backwards.
See also
| start | () | method |
| toString | () | method |
public override function toString():StringReturns either the _id or a description of the tween.
ReturnsString |
| EXISTING_FROM_VALUE | constant |
public static const EXISTING_FROM_VALUE:Number = -InfinityUse this property to cause the tween to start from whatever the targetProperty is set to at the time the tween executes.