| Package | org.as3lib.kitchensync.action |
| Class | public class KSDispatchEvent |
| Inheritance | KSDispatchEvent AbstractAction flash.events.EventDispatcher |
| 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
Checks to see whether the duration of the action has elapsed and if the _startTime is defined.
| AbstractAction | |
| event : Event
The event that will be dispatched.
| KSDispatchEvent | ||
| eventType : String [write-only]
Using this will set the event to a generic Event object with type of
type. | KSDispatchEvent | ||
![]() | isInstantaneous : Boolean Returns true if the action will occur instantaneously when started
| AbstractAction | |
![]() | isPaused : Boolean
Will return true if the action is paused (after pause() has been called).
| AbstractAction | |
![]() | isRunning : Boolean
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 | |
![]() | 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 | |
| target : IEventDispatcher
This is the IEventDispatcher that the event will be dispatched from.
| KSDispatchEvent | ||
![]() | timeStringParser : ITimeStringParser
[static]
The timeStringParser will determine how strings are parsed into valid
time values.
| AbstractAction | |
| useWeakReferences : Boolean
Set to false if you want to keep a strong reference to the event being dispatched.
| KSDispatchEvent | ||
| Property | Defined by | ||
|---|---|---|---|
![]() | _autoDelete : Boolean | AbstractAction | |
![]() | _delay : int = 0 | AbstractAction | |
![]() | _duration : int = 0 | AbstractAction | |
| _event : Event | KSDispatchEvent | ||
![]() | _paused : Boolean = false | AbstractAction | |
![]() | _pauseTime : Timestamp | AbstractAction | |
![]() | _running : Boolean = false | AbstractAction | |
![]() | _startTime : Timestamp | AbstractAction | |
![]() | _sync : Boolean | AbstractAction | |
| _target : IEventDispatcher | KSDispatchEvent | ||
| _useWeakReferences : Boolean = true | KSDispatchEvent | ||
| Method | Defined by | ||
|---|---|---|---|
|
KSDispatchEvent(event:*, target:IEventDispatcher, ... delay = 0, listeners:*)
Constructor.
| KSDispatchEvent | ||
|
addEventListenerToTarget(listener:Function, useCapture:Boolean = false, priority:int = 0.0):void
Allows you to add an event listener to the target that is dispatching the event.
| KSDispatchEvent | ||
![]() |
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 | |
| KSDispatchEvent | |||
|
kill():void
override to clean up references to other objects.
| KSDispatchEvent | ||
![]() |
pause():void
Causes the action to be paused.
| AbstractAction | |
![]() |
register():void
Adds the action as a listener to the Synchronizer's update event.
| AbstractAction | |
|
removeEventListenerFromTarget(listener:Function, useCapture:Boolean = false):void
Allows you to remove an event listener from the target that is dispatching the event.
| KSDispatchEvent | ||
![]() |
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 | |
|
When the delay is reached, the event will be fired from the target.
| KSDispatchEvent | ||
| Constant | Defined by | ||
|---|---|---|---|
| SELF : IEventDispatcher = null [static]
| KSDispatchEvent | ||
| _event | property |
protected var _event:Event
| event | property |
event:Event [read-write]The event that will be dispatched.
Implementation public function get event():Event
public function set event(value:Event):void
| eventType | property |
eventType:String [write-only]
Using this will set the event to a generic Event object with type of type.
public function set eventType(value:String):void
| _target | property |
protected var _target:IEventDispatcher
| target | property |
target:IEventDispatcher [read-write]
This is the IEventDispatcher that the event will be dispatched from. Default is this.
public function get target():IEventDispatcher
public function set target(value:IEventDispatcher):void
| _useWeakReferences | property |
protected var _useWeakReferences:Boolean = true
| useWeakReferences | property |
useWeakReferences:Boolean [read-write]Set to false if you want to keep a strong reference to the event being dispatched. Default is true.
Implementation public function get useWeakReferences():Boolean
public function set useWeakReferences(value:Boolean):void
| KSDispatchEvent | () | constructor |
public function KSDispatchEvent(event:*, target:IEventDispatcher, ... delay = 0, listeners:*)Constructor.
Parametersevent:* — - Can be either an Event object or a String. If event is an Event, that object is used.
If event is a string, a new event with that type is automatically created.
|
|
target:IEventDispatcher — - The IEventDispatcher that will dispatch the event. The default is this.
|
|
... delay (default = 0) — - time to wait before execution
|
|
listeners:* — - Any additional objects passed in will be added as listeners (if they're functions)
|
— - If any objects in listeners are not of type Function.
|
| addEventListenerToTarget | () | method |
public function addEventListenerToTarget(listener:Function, useCapture:Boolean = false, priority:int = 0.0):voidAllows you to add an event listener to the target that is dispatching the event. Note that useWeakReference will always be true so that the listeners don't need to be removed.
Parameterslistener:Function |
|
useCapture:Boolean (default = false) |
|
priority:int (default = 0.0) |
| clone | () | method |
| kill | () | method |
public override function kill():voidoverride to clean up references to other objects.
| removeEventListenerFromTarget | () | method |
public function removeEventListenerFromTarget(listener:Function, useCapture:Boolean = false):voidAllows you to remove an event listener from the target that is dispatching the event.
Parameterslistener:Function |
|
useCapture:Boolean (default = false) |
| update | () | method |
public override function update(currentTimestamp:Timestamp):voidWhen the delay is reached, the event will be fired from the target. Note that if duration is > 0, this will continue to fire for every frame until duration is elapsed.
ParameterscurrentTimestamp:Timestamp |
| SELF | constant |
public static const SELF:IEventDispatcher = null