Packagecom.kapit.diagram.anim
Classpublic class TweenEngine
InheritanceTweenEngine Inheritance flash.events.EventDispatcher

Tweening engine used for animating DiagramObjects boxes and transforming DiagramLinks paths



Public Properties
 PropertyDefined by
  curtime : uint
[read-only]
TweenEngine
  duration : uint
Default duration in milliseconds of the animation.
TweenEngine
  easingfunction : Function
Default easing function.
TweenEngine
  frequency : uint
Frequency in frames/second of the animation
TweenEngine
  playing : Boolean
[read-only]
TweenEngine
Protected Properties
 PropertyDefined by
  _curtime : int
TweenEngine
  _dispatcher : EventDispatcher = null
TweenEngine
  _duration : uint = 0
TweenEngine
  _easingfunc : Function = null
TweenEngine
  _interval : uint
TweenEngine
  _nbactive : uint = 0
TweenEngine
  _starttime : uint
TweenEngine
  _timer : Timer = null
TweenEngine
  _tweeners : Array
TweenEngine
Public Methods
 MethodDefined by
  
TweenEngine(disp:EventDispatcher = null, freq:Number = 100, defaultduration:uint = 1000, easing:Function = null)
TweenEngine
  
cancel():void
Moves the playhead to the start of animation and stops any further tweening.
TweenEngine
  
play(arr:Array):void
Starts to animate DiagramObjects referenced by a Tweener array.
TweenEngine
  
stop():void
Moves the playhead directly to the end of animation and stops
TweenEngine
Protected Methods
 MethodDefined by
  
initTweeners():void
Initialises each tweener duration and easingfunction.
TweenEngine
  
timerHandler(event:TimerEvent):void
TweenEngine
Property detail
_curtimeproperty
protected var _curtime:int
curtimeproperty 
curtime:uint  [read-only]

Implementation
    public function get curtime():uint
_dispatcherproperty 
protected var _dispatcher:EventDispatcher = null
_durationproperty 
protected var _duration:uint = 0
durationproperty 
duration:uint  [read-write]

Default duration in milliseconds of the animation. Might be overriden by participant Tweeners. Used as tweener duration when Tweener::duration==0

Implementation
    public function get duration():uint
    public function set duration(value:uint):void
_easingfuncproperty 
protected var _easingfunc:Function = null
easingfunctionproperty 
easingfunction:Function  [read-write]

Default easing function. Might be overriden by participant Tweeners. Used as tweener easing function when Tweener::easingfunction==null

Implementation
    public function get easingfunction():Function
    public function set easingfunction(value:Function):void
frequencyproperty 
frequency:uint  [read-write]

Frequency in frames/second of the animation

Implementation
    public function get frequency():uint
    public function set frequency(value:uint):void
_intervalproperty 
protected var _interval:uint
_nbactiveproperty 
protected var _nbactive:uint = 0
playingproperty 
playing:Boolean  [read-only]

Implementation
    public function get playing():Boolean
_starttimeproperty 
protected var _starttime:uint
_timerproperty 
protected var _timer:Timer = null
_tweenersproperty 
protected var _tweeners:Array
Constructor detail
TweenEngine()constructor
public function TweenEngine(disp:EventDispatcher = null, freq:Number = 100, defaultduration:uint = 1000, easing:Function = null)

Parameters
disp:EventDispatcher (default = null) — frequency in frames/second of the animation
 
freq:Number (default = 100) — defaultduration used for tweeners whose duration == 0
 
defaultduration:uint (default = 1000) — default easing function used for tweeners whose easingfunction == null
 
easing:Function (default = null)
Method detail
cancel()method
public function cancel():void

Moves the playhead to the start of animation and stops any further tweening.

initTweeners()method 
protected function initTweeners():void

Initialises each tweener duration and easingfunction. Called by play()

play()method 
public function play(arr:Array):void

Starts to animate DiagramObjects referenced by a Tweener array.

Parameters
arr:Array — An array of Tweener objects
stop()method 
public function stop():void

Moves the playhead directly to the end of animation and stops

timerHandler()method 
protected function timerHandler(event:TimerEvent):voidParameters
event:TimerEvent