Packageorg.as3lib.kitchensync.action
Classpublic class KSSimpleTween
InheritanceKSSimpleTween Inheritance flash.events.EventDispatcher
ImplementsIAction, ITween

A simplified version of the KSTween class with NO bells or whistles. Designed for optimized performance, file size, and minimal memory use.

See also

org.as3lib.kitchensync.action.KSTween;
org.as3lib.kitchensync.easing;


Public Properties
 PropertyDefined by
  delay : int
delay before the animation begins in milliseconds.
KSSimpleTween
  duration : int
duration of tween, not including delay, in milliseconds.
KSSimpleTween
  easingFunction : Function
the easing function to use with the tween
KSSimpleTween
  endValue : Number
the ending value of the tween.
KSSimpleTween
  isPaused : Boolean
[read-only] True when the action is paused
KSSimpleTween
  isRunning : Boolean
[read-only] True when the action is running (or paused)
KSSimpleTween
  property : String
property of the target object to affect as a string.
KSSimpleTween
  startValue : Number
the starting value of the tween.
KSSimpleTween
  target : Object
target object whose properties will be affected.
KSSimpleTween
Protected Properties
 PropertyDefined by
  _delay : int = 0
KSSimpleTween
  _delta : Number
a cached value for the difference between the start and end.
KSSimpleTween
  _duration : int = 0
KSSimpleTween
  _paused : Boolean = false
Set to true internally when the puase() mehtod is called (false when unpaused)
KSSimpleTween
  _pauseTime : int
The time at which the tween was last paused.
KSSimpleTween
  _running : Boolean = false
Set to true internally if when the start() method is called (false when stopped).
KSSimpleTween
  _startTime : int
The time at which the tween was started.
KSSimpleTween
Public Methods
 MethodDefined by
  
KSSimpleTween(target:Object, property:String, startValue:Number, endValue:Number, duration:int, delay:int, easingFunction:Function = null)
Constuctor.
KSSimpleTween
  
KSSimpleTween
  
kill():void
KSSimpleTween
  
pause():void
KSSimpleTween
  
Starts the tween.
KSSimpleTween
  
stop():void
Stops the tween.
KSSimpleTween
  
toString():String
KSSimpleTween
  
unpause():void
Resumes the action at the point where it was paused.
KSSimpleTween
  
update(currentTimestamp:Timestamp):void
Called when a pulse is sent from the Synchronizer
KSSimpleTween
Protected Methods
 MethodDefined by
  
complete():void
Called internally when the tween is completed.
KSSimpleTween
Property detail
_delayproperty
protected var _delay:int = 0
delayproperty 
delay:int  [read-write]

delay before the animation begins in milliseconds.

Implementation
    public function get delay():int
    public function set delay(value:int):void
_deltaproperty 
protected var _delta:Number

a cached value for the difference between the start and end.

_durationproperty 
protected var _duration:int = 0
durationproperty 
duration:int  [read-write]

duration of tween, not including delay, in milliseconds.

Implementation
    public function get duration():int
    public function set duration(value:int):void
easingFunctionproperty 
public var easingFunction:Function

the easing function to use with the tween

endValueproperty 
public var endValue:Number

the ending value of the tween.

isPausedproperty 
isPaused:Boolean  [read-only]

True when the action is paused

Implementation
    public function get isPaused():Boolean
isRunningproperty 
isRunning:Boolean  [read-only]

True when the action is running (or paused)

Implementation
    public function get isRunning():Boolean
_pausedproperty 
protected var _paused:Boolean = false

Set to true internally when the puase() mehtod is called (false when unpaused)

_pauseTimeproperty 
protected var _pauseTime:int

The time at which the tween was last paused.

propertyproperty 
public var property:String

property of the target object to affect as a string.

_runningproperty 
protected var _running:Boolean = false

Set to true internally if when the start() method is called (false when stopped).

_startTimeproperty 
protected var _startTime:int

The time at which the tween was started.

startValueproperty 
public var startValue:Number

the starting value of the tween.

targetproperty 
public var target:Object

target object whose properties will be affected.

Constructor detail
KSSimpleTween()constructor
public function KSSimpleTween(target:Object, property:String, startValue:Number, endValue:Number, duration:int, delay:int, easingFunction:Function = null)

Constuctor.

Parameters
target:Object — - the object whose property will be changed.
 
property:String — - the name of the property to change. The property must be a Number, int or uint such as a Sprite object's "alpha"
 
startValue:Number — - the value to tween the property to. After the tween is done, this will be the value of the property.
 
endValue:Number — - the starting value of the tween.
 
duration:int — - the time in milliseconds that this tween will take to execute.
 
delay:int — - the time to wait in milliseconds before starting the tween.
 
easingFunction:Function (default = null) — - the function to use to interpolate the values between fromValue and toValue.
Method detail
clone()method
public function clone():IAction

Returns
IAction
complete()method 
protected function complete():void

Called internally when the tween is completed.

kill()method 
public function kill():void
pause()method 
public function pause():void
start()method 
public function start():IAction

Starts the tween.

Returns
IAction — IAction - returns self (for convenience)
stop()method 
public function stop():void

Stops the tween. All progress will be lost and the tween will restart from the startValue if start() is called again.

toString()method 
public override function toString():String

Returns
String
unpause()method 
public function unpause():void

Resumes the action at the point where it was paused.

update()method 
public function update(currentTimestamp:Timestamp):void

Called when a pulse is sent from the Synchronizer

Parameters
currentTimestamp:Timestamp