| Package | org.as3lib.kitchensync.action |
| Class | public class KSFunction |
| Inheritance | KSFunction AbstractAction flash.events.EventDispatcher |
| Subclasses | KSActionController, KSAsynchronousFunction, KSMovieClipController, KSSetProperty, KSTrace |
| Property | Defined by | ||
|---|---|---|---|
![]() | autoDelete : Boolean
autoDelete is a flag that indicates whether the action should be deleted
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 : * [write-only]
| KSFunction | ||
![]() | durationHasElapsed : Boolean
Checks to see whether the duration of the action has elapsed and if the _startTime is defined.
| AbstractAction | |
| func : Function [write-only]
The function that will be called by the action.
| KSFunction | ||
![]() | isPaused : Boolean
Will return true if the action is paused (after pause() has been called).
| AbstractAction | |
![]() | isRunning : Boolean
Will return true when the action is running (after start() has been called).
| AbstractAction | |
![]() | name : String
The human-readable name of this action.
| AbstractAction | |
![]() | offset : int
legacy accessors.
| AbstractAction | |
![]() | pauseTime : Timestamp
The time at which the action was last paused.
| AbstractAction | |
| result : * [read-only]
The result of the function (if the function generates one.
| KSFunction | ||
![]() | startTime : Timestamp
The time at which the action was last started.
| AbstractAction | |
![]() | startTimeHasElapsed : Boolean
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 | ||
|---|---|---|---|
| _args : Array
Arguments that will be passed into the function.
| KSFunction | ||
![]() | _autoDelete : Boolean | AbstractAction | |
![]() | _delay : int = 0 | AbstractAction | |
![]() | _duration : int = 0 | AbstractAction | |
| _func : Function | KSFunction | ||
![]() | _name : String | AbstractAction | |
![]() | _paused : Boolean = false | AbstractAction | |
![]() | _pauseTime : Timestamp | AbstractAction | |
| _result : * | KSFunction | ||
![]() | _running : Boolean = false | AbstractAction | |
![]() | _startTime : Timestamp | AbstractAction | |
![]() | _sync : Boolean | AbstractAction | |
| Method | Defined by | ||
|---|---|---|---|
|
KSFunction(delay:*, func:Function, ... args)
Constructor.
| KSFunction | ||
![]() |
addEventTrigger(dispatcher:IEventDispatcher, eventType:String):void
Causes the action to start playing when a specified event is fired.
| AbstractAction | |
![]() |
addTrigger(trigger:AbstractAction):void
Causes the action to start playing when another event completes.
| AbstractAction | |
| KSFunction | |||
|
invoke():*
Calls the function with the arguments specified.
| KSFunction | ||
|
kill():void
| KSFunction | ||
![]() |
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:AbstractAction):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 | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
complete():void
Call this when the action has completed.
| AbstractAction | |
![]() |
forceUpdate():void
Foreces the onUpdate() 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 | |
|
onUpdate(event:KitchenSyncEvent):void
Executes the function when the delay has elapsed.
| KSFunction | ||
| _args | property |
protected var _args:ArrayArguments that will be passed into the function.
| duration | property |
duration:* [write-only]Implementation
public function set duration(value:*):void
| _func | property |
protected var _func:Function
| func | property |
func:Function [write-only]The function that will be called by the action.
Implementation public function set func(value:Function):void
| _result | property |
protected var _result:*
| result | property |
result:* [read-only]The result of the function (if the function generates one.
Implementation public function get result():*
| KSFunction | () | constructor |
public function KSFunction(delay:*, func:Function, ... args)Constructor.
Parametersdelay:* — - the number of frames to delay the action
|
|
func:Function — - the function or method to call at the specified time
|
|
... args — - the rest of the parameters become arguments passed to the function at the time it's called.
|
| clone | () | method |
| invoke | () | method |
public function invoke():*Calls the function with the arguments specified. The result of the function is stored in the results property of the SynchronizedFunction object.
Returns* |
| kill | () | method |
public override function kill():void
| onUpdate | () | method |
protected override function onUpdate(event:KitchenSyncEvent):voidExecutes the function when the delay has elapsed. If the duration is > 0, it will repeat until the duration has elapsed.
Parametersevent:KitchenSyncEvent |