| Package | system.process |
| Class | public class EventDispatcherTask |
| Inheritance | EventDispatcherTask Task Object |
Example :
package examples
{
import system.process.Action;
import system.process.EventDispatcherTask;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.EventDispatcher;
public class EventDispatcherTaskExample extends Sprite
{
public function EventDispatcherTaskExample()
{
var dispatcher:EventDispatcher = new EventDispatcher() ;
var event:Event = new Event("action") ;
process.addEventListener( "action" , debug ) ;
var process:EventDispatcherTask = new EventDispatcherTask( dispatcher , event ) ;
process.finishIt.connect( finish ) ;
process.start.connect( start ) ;
process.run() ;
}
public function debug( e:Event ):void
{
trace( e.type ) ;
}
public function finish( action:Action ):void
{
trace( "finish" ) ;
}
public function start( action:Action ):void
{
trace( "start" ) ;
}
}
}
| Property | Defined By | ||
|---|---|---|---|
| dispatcher : EventDispatcher
The EventDispatcher reference. | EventDispatcherTask | ||
| event : Event
The event to dispatch in this process. | EventDispatcherTask | ||
![]() | finishIt : Signaler
This signal emit when the notifyFinished method is invoked. | Task | |
![]() | logger : Logger
Determinates the internal Logger reference of this Loggable object. | Task | |
![]() | phase : String [read-only]
The current phase of the action. | Task | |
![]() | running : Boolean [read-only]
Indicates true if the process is in progress. | Task | |
![]() | startIt : Signaler
This signal emit when the notifyStarted method is invoked. | Task | |
| verbose : Boolean
Switch the verbose mode of the task. | EventDispatcherTask | ||
| Method | Defined By | ||
|---|---|---|---|
EventDispatcherTask(dispatcher:EventDispatcher = null, event:* = null, verbose:Boolean = false)
Creates a new EventDispatcherTask instance. | EventDispatcherTask | ||
clone():* [override]
Returns a shallow copy of this object. | EventDispatcherTask | ||
![]() | isLocked():Boolean
Returns true if the object is locked. | Task | |
![]() | lock():void
Locks the object. | Task | |
![]() | notifyFinished():void
Notify an ActionEvent when the process is finished. | Task | |
![]() | notifyStarted():void
Notify an ActionEvent when the process is started. | Task | |
run(... arguments):void [override]
Run the process. | EventDispatcherTask | ||
![]() | unlock():void
Unlocks the display. | Task | |
| dispatcher | property |
public var dispatcher:EventDispatcherThe EventDispatcher reference.
| event | property |
public var event:EventThe event to dispatch in this process.
| verbose | property |
public var verbose:BooleanSwitch the verbose mode of the task.
| EventDispatcherTask | () | Constructor |
public function EventDispatcherTask(dispatcher:EventDispatcher = null, event:* = null, verbose:Boolean = false)Creates a new EventDispatcherTask instance.
Parametersdispatcher:EventDispatcher (default = null) — The EventDispatcher reference.
| |
event:* (default = null) — The event to dispatch.
| |
verbose:Boolean (default = false) — Switch the verbose mode of the task.
|
| clone | () | method |
override public function clone():*Returns a shallow copy of this object.
Returns* — a shallow copy of this object.
|
| run | () | method |
override public function run(... arguments):voidRun the process.
Parameters
... arguments |