Packagecom.flashdynamix.motion
Classpublic class TweensySequence

TweensySequence Class allows for complex animations which occur one after another. This can of course be done with the TweensyGroup or Tweensy class but the TweensySequence class helps you by calculating the delayStarts for each tween as it's pushed into the sequence queue.

See also

com.flashdynamix.motion.Tweensy
com.flashdynamix.motion.TweensyGroup
com.flashdynamix.motion.TweensyTimeline


Public Properties
 PropertyDefined by
  canRepeat : Boolean
[read-only] Defines whether the TweensyTimeline repeats.
TweensySequence
  onComplete : Function
Executed when the TweensySequence animation is complete.
TweensySequence
  onCompleteParams : Array
Parameters applied to the onComplete Function.
TweensySequence
  paused : Boolean
[read-only] Whether the TweensySequence is paused.
TweensySequence
  refreshType : String
TweensySequence
  repeatCount : int = 0
The count of the number of repeats which have occured.
TweensySequence
  repeats : int = -1
The number of repeats to use.
TweensySequence
  repeatType : String
Defines the repeat type for the animation.
TweensySequence
  snapToClosest : Boolean
Whether the timelines contained within the TweensyGroup class will snap tweened properties to the closest whole number.
TweensySequence
  useSmartRotate : Boolean
Whether the timelines contained within the TweensyGroup class will use smart rotation or not.
Using smart rotation will ensure that when tweening the 'rotation' property it will turn in the shortest rotation direction.
This fixes what may otherwise appear as a visual glitch even though mathimatically it is correct.
TweensySequence
Public Methods
 MethodDefined by
  
TweensySequence
  
addAt(index:int, instance:Object, to:Object, duration:Number = 0.5, ease:Function = null, delayStart:Number = 0, delayEnd:Number = 0, update:Object = null, onComplete:Function = null, onCompleteParams:Array = null):void
Adds an animation to the specified index position in the animation sequence.
TweensySequence
  
dispose():void
Disposes the TweensySequence Class ready for garbage collection.
TweensySequence
  
pause():void
Pauses playback of the TweensySequence.
TweensySequence
  
push(instance:Object, to:Object, duration:Number = 0.5, ease:Function = null, delayStart:Number = 0, delayEnd:Number = 0, update:Object = null, onComplete:Function = null, onCompleteParams:Array = null):void
Adds an animation after the last animation in the sequence.
TweensySequence
  
removeAt(index:int):void
Removes an animation from the sequence at the specified position.
TweensySequence
  
replay():void
Plays a timeline animation at its start position.
TweensySequence
  
resume():void
Resumes playback of the TweensySequence.
TweensySequence
  
start():void
Starts playing the TweensySequence.
TweensySequence
  
stop():void
Stops playing the TweensySequence.
TweensySequence
  
unshift(instance:Object, to:Object, duration:Number = 0.5, ease:Function = null, delayStart:Number = 0, delayEnd:Number = 0, update:Object = null, onComplete:Function = null, onCompleteParams:Array = null):void
Adds an animation before the first animation in the sequence.
TweensySequence
  
yoyo():void
TweensySequence
Property detail
canRepeatproperty
canRepeat:Boolean  [read-only]

Defines whether the TweensyTimeline repeats.

Implementation
    public function get canRepeat():Boolean

See also

onCompleteproperty 
public var onComplete:Function

Executed when the TweensySequence animation is complete.

See also

com.flashdynamix.motion.TweensySequence.onCompleteParams
onCompleteParamsproperty 
public var onCompleteParams:Array

Parameters applied to the onComplete Function.

See also

com.flashdynamix.motion.TweensySequence.onComplete
pausedproperty 
paused:Boolean  [read-only]

Whether the TweensySequence is paused.

Implementation
    public function get paused():Boolean
refreshTypeproperty 
refreshType:String  [read-write]Implementation
    public function get refreshType():String
    public function set refreshType(value:String):void
repeatCountproperty 
public var repeatCount:int = 0

The count of the number of repeats which have occured.

See also

com.flashdynamix.motion.TweensySequence.repeats
com.flashdynamix.motion.TweensySequence.repeatType
repeatsproperty 
public var repeats:int = -1

The number of repeats to use. If -1 is used then the animation will repeat indefinitely.

See also

com.flashdynamix.motion.TweensySequence.repeats
com.flashdynamix.motion.TweensySequence.repeatType
repeatTypeproperty 
public var repeatType:String

Defines the repeat type for the animation. By default this is TweensyTimeline.NONE

Options include :

See also

com.flashdynamix.motion.TweensySequence.repeats
com.flashdynamix.motion.TweensySequence.repeatCount
com.flashdynamix.motion.TweensyTimeline.NONE
com.flashdynamix.motion.TweensyTimeline.REPLAY
com.flashdynamix.motion.TweensyTimeline.LOOP
snapToClosestproperty 
snapToClosest:Boolean  [read-write]

Whether the timelines contained within the TweensyGroup class will snap tweened properties to the closest whole number.

Implementation
    public function get snapToClosest():Boolean
    public function set snapToClosest(value:Boolean):void
useSmartRotateproperty 
useSmartRotate:Boolean  [read-write]

Whether the timelines contained within the TweensyGroup class will use smart rotation or not.
Using smart rotation will ensure that when tweening the 'rotation' property it will turn in the shortest rotation direction.
This fixes what may otherwise appear as a visual glitch even though mathimatically it is correct.

Implementation
    public function get useSmartRotate():Boolean
    public function set useSmartRotate(value:Boolean):void
Constructor detail
TweensySequence()constructor
public function TweensySequence()

Method detail
addAt()method
public function addAt(index:int, instance:Object, to:Object, duration:Number = 0.5, ease:Function = null, delayStart:Number = 0, delayEnd:Number = 0, update:Object = null, onComplete:Function = null, onCompleteParams:Array = null):void

Adds an animation to the specified index position in the animation sequence.

Parameters
index:int — The index to insert this animation into the sequence
 
instance:Object — The instance Object to be tweened or multiple instances if using the type Array e.g. [item1, item2]
 
to:Object — An Object containing the properties you would like to tween to e.g. {x:50, y:25} or this can be relative e.g. {x:'50', y:'-25'} or can be a random position e.g. {x:'-50, 50', y:'-25, 25'}
 
duration:Number (default = 0.5) — The time in secs you would like the tween to run.
 
ease:Function (default = null) — The ease equation you would like to use e.g. Quintic.easeOut.
 
delayStart:Number (default = 0) — The delay you would like to use at the beginning of the tween and every subsequent repeat of a tween.
 
delayEnd:Number (default = 0) — This param is used when tweening a property in an Object which needs to be applied onto another Object each time the tween occurs.
For example to(new DropShadowFilter(), {alpha:0}, myDisplayItem); Will apply the tweening DropShadowFilter onto the DisplayObject 'myDisplayItem'.
 
update:Object (default = null) — The onComplete event handler you would like to fire once the tween is complete.
 
onComplete:Function (default = null) — The params applied to the onComplete handler.
 
onCompleteParams:Array (default = null)

See also

dispose()method 
public function dispose():void

Disposes the TweensySequence Class ready for garbage collection.

pause()method 
public function pause():void

Pauses playback of the TweensySequence.

push()method 
public function push(instance:Object, to:Object, duration:Number = 0.5, ease:Function = null, delayStart:Number = 0, delayEnd:Number = 0, update:Object = null, onComplete:Function = null, onCompleteParams:Array = null):void

Adds an animation after the last animation in the sequence.

Parameters
instance:Object — The instance Object to be tweened or multiple instances if using the type Array e.g. [item1, item2]
 
to:Object — An Object containing the properties you would like to tween to e.g. {x:50, y:25} or this can be relative e.g. {x:'50', y:'-25'} or can be a random position e.g. {x:'-50, 50', y:'-25, 25'}
 
duration:Number (default = 0.5) — The time in secs you would like the tween to run.
 
ease:Function (default = null) — The ease equation you would like to use e.g. Quintic.easeOut.
 
delayStart:Number (default = 0) — The delay you would like to use at the beginning of the tween and every subsequent repeat of a tween.
 
delayEnd:Number (default = 0) — This param is used when tweening a property in an Object which needs to be applied onto another Object each time the tween occurs.
For example to(new DropShadowFilter(), {alpha:0}, myDisplayItem); Will apply the tweening DropShadowFilter onto the DisplayObject 'myDisplayItem'.
 
update:Object (default = null) — The onComplete event handler you would like to fire once the tween is complete.
 
onComplete:Function (default = null) — The params applied to the onComplete handler.
 
onCompleteParams:Array (default = null)

See also

removeAt()method 
public function removeAt(index:int):void

Removes an animation from the sequence at the specified position.

Parameters
index:int
replay()method 
public function replay():void

Plays a timeline animation at its start position.

See also

resume()method 
public function resume():void

Resumes playback of the TweensySequence.

start()method 
public function start():void

Starts playing the TweensySequence.

stop()method 
public function stop():void

Stops playing the TweensySequence.

unshift()method 
public function unshift(instance:Object, to:Object, duration:Number = 0.5, ease:Function = null, delayStart:Number = 0, delayEnd:Number = 0, update:Object = null, onComplete:Function = null, onCompleteParams:Array = null):void

Adds an animation before the first animation in the sequence.

Parameters
instance:Object — The instance Object to be tweened or multiple instances if using the type Array e.g. [item1, item2]
 
to:Object — An Object containing the properties you would like to tween to e.g. {x:50, y:25} or this can be relative e.g. {x:'50', y:'-25'} or can be a random position e.g. {x:'-50, 50', y:'-25, 25'}
 
duration:Number (default = 0.5) — The time in secs you would like the tween to run.
 
ease:Function (default = null) — The ease equation you would like to use e.g. Quintic.easeOut.
 
delayStart:Number (default = 0) — The delay you would like to use at the beginning of the tween and every subsequent repeat of a tween.
 
delayEnd:Number (default = 0) — This param is used when tweening a property in an Object which needs to be applied onto another Object each time the tween occurs.
For example to(new DropShadowFilter(), {alpha:0}, myDisplayItem); Will apply the tweening DropShadowFilter onto the DisplayObject 'myDisplayItem'.
 
update:Object (default = null) — The onComplete event handler you would like to fire once the tween is complete.
 
onComplete:Function (default = null) — The params applied to the onComplete handler.
 
onCompleteParams:Array (default = null)

See also

yoyo()method 
public function yoyo():void