Packageorg.osmf.smpte.tt.utilities
Classpublic class AsyncThread
InheritanceAsyncThread Inheritance flash.events.EventDispatcher



Public Properties
 PropertyDefined By
  isComplete : Boolean
[read-only]
AsyncThread
  isStarted : Boolean
AsyncThread
  shape : Shape
[read-only]
AsyncThread
Public Methods
 MethodDefined By
  
AsyncThread
  
create(func:Function, args:Array = null):AsyncThread
[static] Creates a thread instance, starting at the given function.
AsyncThread
  
queue(func:Function, args:Array = null):void
[static] Even though this function is static, it operates on the current active runner thread.
AsyncThread
  
run(elapsed:int = -1):void
Will execute this thread for the amount of time specified, if no argument is passed it will run to completion
AsyncThread
  
runEachFrame(elapsed:int = 100):void
A common use case.
AsyncThread
  
step():void
AsyncThread
  
stop():void
AsyncThread
  
stop():void
[static]
AsyncThread
Events
 Event Summary Defined By
  AsyncThread
  AsyncThread
Public Constants
 ConstantDefined By
  STARTED : String = started
[static]
AsyncThread
Property Detail
isCompleteproperty
isComplete:Boolean  [read-only]

This property can be used as the source for data binding.


Implementation
    public function get isComplete():Boolean
isStartedproperty 
isStarted:Boolean

This property can be used as the source for data binding.


Implementation
    public function get isStarted():Boolean
    public function set isStarted(value:Boolean):void
shapeproperty 
shape:Shape  [read-only]


Implementation
    public function get shape():Shape
Constructor Detail
AsyncThread()Constructor
public function AsyncThread()



Method Detail
create()method
public static function create(func:Function, args:Array = null):AsyncThread

Creates a thread instance, starting at the given function. You can then call thread.step() to execute the first step and any other nested steps that get queued as well.

Parameters

func:Function
 
args:Array (default = null)

Returns
AsyncThread
queue()method 
public static function queue(func:Function, args:Array = null):void

Even though this function is static, it operates on the current active runner thread. It is only meant to be called from within functions that are designed to work with async threads.

Parameters

func:Function
 
args:Array (default = null)

run()method 
public function run(elapsed:int = -1):void

Will execute this thread for the amount of time specified, if no argument is passed it will run to completion

Parameters

elapsed:int (default = -1) — the time, in milliseconds, that this thread is given to run. defaults to -1 ( no limit )

runEachFrame()method 
public function runEachFrame(elapsed:int = 100):void

A common use case. Will add an enter frame listener and try to run( elapsed ) on each frame.

Parameters

elapsed:int (default = 100)

step()method 
public function step():void

stop()method 
public function stop():void

stop()method 
public static function stop():void

Event Detail
complete Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.COMPLETE

started Event  
Event Object Type: flash.events.Event

Constant Detail
STARTEDConstant
public static const STARTED:String = started