| Package | org.as3lib.kitchensync.action |
| Class | public class AbstractAction |
| Inheritance | AbstractAction flash.events.EventDispatcher |
| Implements | IAction |
| Subclasses | AbstractActionGroup, KSDispatchEvent, KSFunction, KSSoundController, KSTween, KSWait |
| Property | Defined by | ||
|---|---|---|---|
| autoDelete : Boolean
autoDelete is a flag that indicates whether the action should be killed
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 [read-only]
Checks to see whether the duration of the action has elapsed and if the _startTime is defined.
| AbstractAction | ||
| isInstantaneous : Boolean [read-only] Returns true if the action will occur instantaneously when started
| AbstractAction | ||
| isPaused : Boolean [read-only]
Will return true if the action is paused (after pause() has been called).
| AbstractAction | ||
| isRunning : Boolean [read-only]
The human-readable name of this action.
| AbstractAction | ||
| offset : int
legacy accessors.
| AbstractAction | ||
| pauseTime : Timestamp
[read-only]
The time at which the action was last paused.
| AbstractAction | ||
| startTime : Timestamp
[read-only]
The time at which the action was last started.
| AbstractAction | ||
| startTimeHasElapsed : Boolean [read-only]
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 | ||
| Property | Defined by | ||
|---|---|---|---|
| _autoDelete : Boolean | AbstractAction | ||
| _delay : int = 0 | AbstractAction | ||
| _duration : int = 0 | AbstractAction | ||
| _paused : Boolean = false | AbstractAction | ||
| _pauseTime : Timestamp | AbstractAction | ||
| _running : Boolean = false | AbstractAction | ||
| _startTime : Timestamp | AbstractAction | ||
| _sync : Boolean | AbstractAction | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| AbstractAction | ||
|
addEventTrigger(dispatcher:IEventDispatcher, eventType:String):void
Causes the action to start playing when a specified event is fired.
| AbstractAction | ||
|
addTrigger(trigger:IAction):void
Causes the action to start playing when another event completes.
| AbstractAction | ||
|
Creates a copy of the object with all the property values of the original and returns it.
| AbstractAction | ||
|
kill():void
Unregisters the function and removes any refrerences to objects that it may be holding onto.
| AbstractAction | ||
|
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:IAction):void
Removes a trigger added with addTrigger().
| AbstractAction | ||
|
Starts the timer for this action.
| AbstractAction | ||
|
stop():void
Stops the action from running and resets the timer.
| AbstractAction | ||
|
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 | ||
|
This function will be registered by the register method to respond to update events from the synchronizer.
| AbstractAction | ||
| Method | Defined by | ||
|---|---|---|---|
|
complete():void
Call this when the action has completed.
| AbstractAction | ||
|
forceUpdate():void
Foreces the update() 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 | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| AbstractAction | ||||
| AbstractAction | ||||
| AbstractAction | ||||
| AbstractAction | ||||
| _autoDelete | property |
protected var _autoDelete:Boolean
| autoDelete | property |
autoDelete:Boolean [read-write]autoDelete is a flag that indicates whether the action should be killed when it is done executing. The default is set to false so the actions must be deleted manually.
Implementation public function get autoDelete():Boolean
public function set autoDelete(value:Boolean):void
| _delay | property |
protected var _delay:int = 0
| delay | property |
delay:int [read-write]delay is the time that will pass after the start() method is called before the action begins. Will accept an integer or a parsable string.
Implementation public function get delay():int
public function set delay(value:int):void
See also
| _duration | property |
protected var _duration:int = 0
| duration | property |
duration:int [read-write]duration is the length of time that the action will run. Will accept an integer or a parsable string.
Implementation public function get duration():int
public function set duration(value:int):void
See also
| durationHasElapsed | property |
durationHasElapsed:Boolean [read-only]Checks to see whether the duration of the action has elapsed and if the _startTime is defined. In other words, checks to see whether the action is finished executing.
Implementation public function get durationHasElapsed():Boolean
| isInstantaneous | property |
isInstantaneous:Boolean [read-only]Returns true if the action will occur instantaneously when started
Implementation public function get isInstantaneous():Boolean
| isPaused | property |
isPaused:Boolean [read-only]Will return true if the action is paused (after pause() has been called). Calling unpause() or stop() will return the value to false.
Implementation public function get isPaused():Boolean
| isRunning | property |
isRunning:Boolean [read-only]The human-readable name of this action. public function get name():String { return _name; } public function set name(name:String):void { _name = name; } protected var _name:String;
Implementation public function get isRunning():Boolean
| offset | property |
offset:int [read-write]legacy accessors. synonomous with delay.
Implementation public function get offset():int
public function set offset(value:int):void
| _paused | property |
protected var _paused:Boolean = false
| _pauseTime | property |
protected var _pauseTime:Timestamp
| pauseTime | property |
pauseTime:Timestamp [read-only]The time at which the action was last paused.
Implementation public function get pauseTime():Timestamp
| _running | property |
protected var _running:Boolean = false
| _startTime | property |
protected var _startTime:Timestamp
| startTime | property |
startTime:Timestamp [read-only]The time at which the action was last started.
Implementation public function get startTime():Timestamp
| startTimeHasElapsed | property |
startTimeHasElapsed:Boolean [read-only]Checks to see whether the start time delay has elapsed and if the _startTime is defined. In other words, checks to see whether the action is ready to execute. Duration is handled seperately.
Implementation public function get startTimeHasElapsed():Boolean
| _sync | property |
protected var _sync:Boolean
| sync | property |
sync:Boolean [read-write]Setting sync to true will cause the action to sync up with real time even if framerate drops. Otherwise, the action will be synced to frames.
Implementation public function get sync():Boolean
public function set sync(value:Boolean):void
| timeStringParser | property |
public static var timeStringParser:ITimeStringParserThe timeStringParser will determine how strings are parsed into valid time values.
See also
| AbstractAction | () | constructor |
public function AbstractAction()Constructor.
| addEventTrigger | () | method |
public function addEventTrigger(dispatcher:IEventDispatcher, eventType:String):voidCauses the action to start playing when a specified event is fired.
Parametersdispatcher:IEventDispatcher — The object that will dispatch the event.
|
|
eventType:String — The event type to listen for.
|
| addTrigger | () | method |
public function addTrigger(trigger:IAction):voidCauses the action to start playing when another event completes.
Parameterstrigger:IAction — Another action that will trigger the start of this action.
|
— If the trigger action is the same as this action.
|
| clone | () | method |
public function clone():IActionCreates a copy of the object with all the property values of the original and returns it. This method should be overrided by child classes to ensure that all properties are copied.
ReturnsIAction |
| complete | () | method |
protected function complete():voidCall this when the action has completed.
| forceUpdate | () | method |
protected function forceUpdate():voidForeces the update() method to fire without being triggered by Synchronizer.
See also
| kill | () | method |
public function kill():voidUnregisters the function and removes any refrerences to objects that it may be holding onto. Subclass this function to remove references to objects used by the action.
| onTrigger | () | method |
protected function onTrigger(event:Event):voidHandler that starts playing the action that is called by a trigger event.
Parametersevent:Event |
See also
| pause | () | method |
public function pause():voidCauses the action to be paused. The action temporarily ignores update events from the Synchronizer and the onUpdate() handler will not be called. When unpause() is called, the action will continue at the point where it was paused. If the pause() method affects the start time even if the delay time hasn't expired yet.
| register | () | method |
public function register():voidAdds the action as a listener to the Synchronizer's update event.
| removeEventTrigger | () | method |
public function removeEventTrigger(dispatcher:IEventDispatcher, eventType:String):voidRemoves an event trigger added by addEventTrigger().
Parametersdispatcher:IEventDispatcher — The event dispatcher to remove.
|
|
eventType:String — The event type to listen for.
|
| removeTrigger | () | method |
public function removeTrigger(trigger:IAction):voidRemoves a trigger added with addTrigger().
Parameterstrigger:IAction — Another action that triggers the start of this action.
|
| start | () | method |
public function start():IActionStarts the timer for this action. Registers the action with the synchronizer.
ReturnsIAction |
— - if the method is called while the action is already running.
|
| stop | () | method |
public function stop():voidStops the action from running and resets the timer.
| unpause | () | method |
public function unpause():voidResumes the action at the point where it was paused.
| unregister | () | method |
public function unregister():voidRemoves the action as a listener to the Synchronizer's update event.
| update | () | method |
public function update(currentTimestamp:Timestamp):voidThis function will be registered by the register method to respond to update events from the synchronizer. Code that performs the action associated with this object should go in this function. This function must be implemented by the subclass. The internal allows certain other classes such as the AbstractSynchronizedGroup to force an update of its children.
ParameterscurrentTimestamp:Timestamp — The current timestamp from the Synchronizer.
|
| actionComplete | event |
| actionPause | event |
| actionStart | event |
| actionUnpause | event |