Packageorg.as3lib.kitchensync.action
Classpublic class KSSequenceGroup
InheritanceKSSequenceGroup Inheritance AbstractActionGroup Inheritance AbstractAction Inheritance flash.events.EventDispatcher
SubclassesKSRandomGroup, KSStepedSequenceGroup

A group of actions that execute one at a time in the order that they were added to the group.



Public Properties
 PropertyDefined by
 InheritedautoDelete : Boolean
autoDelete is a flag that indicates whether the action should be killed when it is done executing.
AbstractAction
 InheritedchildActions : Array
An array containing all of the child actions of the group.
AbstractActionGroup
  childrenAreRunning : Boolean
[read-only]
KSSequenceGroup
  currentAction : IAction
[read-only]
KSSequenceGroup
 Inheriteddelay : int
delay is the time that will pass after the start() method is called before the action begins.
AbstractAction
 Inheritedduration : *
AbstractActionGroup
 InheriteddurationHasElapsed : Boolean
Checks to see whether the duration of the action has elapsed and if the _startTime is defined.
AbstractAction
 InheritedisInstantaneous : Boolean
Returns true if the action will occur instantaneously when started
AbstractAction
 InheritedisPaused : Boolean
Will return true if the action is paused (after pause() has been called).
AbstractAction
 InheritedisRunning : Boolean
The human-readable name of this action.
AbstractAction
 Inheritedoffset : int
legacy accessors.
AbstractAction
 InheritedpauseTime : Timestamp
The time at which the action was last paused.
AbstractAction
 InheritedresetChildrenAtStart : Boolean = true
If true, the group's KSTween children will reset to their default positions when the group is started.
AbstractActionGroup
 InheritedstartTime : Timestamp
The time at which the action was last started.
AbstractAction
 InheritedstartTimeHasElapsed : Boolean
Checks to see whether the start time delay has elapsed and if the _startTime is defined.
AbstractAction
 Inheritedsync : Boolean
Setting sync to true will cause the action to sync up with real time even if framerate drops.
AbstractAction
 InheritedtimeStringParser : ITimeStringParser
[static] The timeStringParser will determine how strings are parsed into valid time values.
AbstractAction
Protected Properties
 PropertyDefined by
 Inherited_autoDelete : Boolean
AbstractAction
 Inherited_childActions : Array
AbstractActionGroup
  _currentAction : IAction = null
KSSequenceGroup
  _currentActionIndex : int = -1
KSSequenceGroup
 Inherited_delay : int = 0
AbstractAction
 Inherited_duration : int = 0
AbstractAction
 Inherited_paused : Boolean = false
AbstractAction
 Inherited_pauseTime : Timestamp
AbstractAction
 Inherited_running : Boolean = false
AbstractAction
 Inherited_startTime : Timestamp
AbstractAction
 Inherited_sync : Boolean
AbstractAction
Public Methods
 MethodDefined by
  
KSSequenceGroup(... children)
Constructor.
KSSequenceGroup
 Inherited
addAction(action:IAction, ... additionalActions):void
Adds an action to the group.
AbstractActionGroup
 Inherited
addActionAtIndex(action:IAction, index:int = -1):void
Adds an action to the group at the specified index.
AbstractActionGroup
 Inherited
addEventTrigger(dispatcher:IEventDispatcher, eventType:String):void
Causes the action to start playing when a specified event is fired.
AbstractAction
 Inherited
addTrigger(trigger:IAction):void
Causes the action to start playing when another event completes.
AbstractAction
  
KSSequenceGroup
 Inherited
Returns the action at the specified index.
AbstractActionGroup
 Inherited
kill():void
AbstractActionGroup
 Inherited
pause():void
AbstractActionGroup
 Inherited
register():void
Adds the action as a listener to the Synchronizer's update event.
AbstractAction
 Inherited
Removes an action from the group.
AbstractActionGroup
 Inherited
Removes an action at the specified index.
AbstractActionGroup
 Inherited
removeEventTrigger(dispatcher:IEventDispatcher, eventType:String):void
Removes an event trigger added by addEventTrigger().
AbstractAction
 Inherited
removeTrigger(trigger:IAction):void
Removes a trigger added with addTrigger().
AbstractAction
 Inherited
Reverse the order that the children play back in.
AbstractActionGroup
  
Override start to automatically quit if there are no children.
KSSequenceGroup
 Inherited
stop():void
AbstractActionGroup
  
toString():String
KSSequenceGroup
 Inherited
unpause():void
AbstractActionGroup
 Inherited
unregister():void
Removes the action as a listener to the Synchronizer's update event.
AbstractAction
  
update(currentTimestamp:Timestamp):void
Listens for updates to synchronize the start time of the sequence.
KSSequenceGroup
Protected Methods
 MethodDefined by
  
checkForComplete():Boolean
Checks to see if all of the children have completed.
KSSequenceGroup
  
complete():void
override to reset the _currentActionIndex.
KSSequenceGroup
 Inherited
forceUpdate():void
Foreces the update() method to fire without being triggered by Synchronizer.
AbstractAction
  
Called when child actions are completed.
KSSequenceGroup
 Inherited
Dispatches a CHILD_START event when the child begins.
AbstractActionGroup
 Inherited
onTrigger(event:Event):void
Handler that starts playing the action that is called by a trigger event.
AbstractAction
  
Starts playing the next action in the sequence.
KSSequenceGroup
Events
 EventSummaryDefined by
 Inherited  AbstractAction
 Inherited  AbstractAction
 Inherited  AbstractAction
 Inherited  AbstractAction
 Inherited  AbstractActionGroup
 Inherited  AbstractActionGroup
Protected Constants
 ConstantDefined by
  NO_CURRENT_ACTION_INDEX : int = -1
KSSequenceGroup
Property detail
childrenAreRunningproperty
childrenAreRunning:Boolean  [read-only]Implementation
    public function get childrenAreRunning():Boolean
_currentActionproperty 
protected var _currentAction:IAction = null
currentActionproperty 
currentAction:IAction  [read-only]Implementation
    public function get currentAction():IAction
_currentActionIndexproperty 
protected var _currentActionIndex:int = -1
Constructor detail
KSSequenceGroup()constructor
public function KSSequenceGroup(... children)

Constructor.

Parameters
... children

Throws
— - if any children are not of type AbstractSynchronizedAction.
Method detail
checkForComplete()method
protected function checkForComplete():Boolean

Checks to see if all of the children have completed. If so, calls the complete method.

Returns
Boolean — true if complete, otherwise false.
clone()method 
public override function clone():IAction

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

override to reset the _currentActionIndex.

onChildFinished()method 
protected override function onChildFinished(event:KitchenSyncEvent):void

Called when child actions are completed. After each is finished, checks to see if the sequence is complete. If not, it starts the next child. Also remove reference to child action so it can be garbage collected.

Parameters
event:KitchenSyncEvent — - The SynchronizerEvent.COMPLETE from the _currentAction
start()method 
public override function start():IAction

Override start to automatically quit if there are no children.

Returns
IAction
startNextAction()method 
protected function startNextAction():IAction

Starts playing the next action in the sequence. Listens for the COMPLETE event for each child and runs onChildFinished() when each child completes. The action that is currently playing will be stored in _currentAction which is publicly accessible.

Returns
IAction — The currently playing action.
toString()method 
public override function toString():String

Returns
String
update()method 
public override function update(currentTimestamp:Timestamp):void

Listens for updates to synchronize the start time of the sequence. The first action in the sequence is called by using the startNextAction() method. After the Sequence starts running, it no longer needs to listen to updates so it unregisters.

Parameters
currentTimestamp:Timestamp
Constant detail
NO_CURRENT_ACTION_INDEXconstant
protected const NO_CURRENT_ACTION_INDEX:int = -1