| Package | org.osmf.smpte.tt.utilities |
| Class | public class AsyncThread |
| Inheritance | AsyncThread flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
| isComplete : Boolean [read-only] | AsyncThread | ||
| isStarted : Boolean | AsyncThread | ||
| shape : Shape [read-only] | AsyncThread | ||
| Method | Defined 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 | ||
| Constant | Defined By | ||
|---|---|---|---|
| STARTED : String = started [static] | AsyncThread | ||
| isComplete | property |
isComplete:Boolean [read-only] This property can be used as the source for data binding.
public function get isComplete():Boolean| isStarted | property |
isStarted:BooleanThis property can be used as the source for data binding.
public function get isStarted():Boolean public function set isStarted(value:Boolean):void| shape | property |
shape:Shape [read-only] public function get shape():Shape| AsyncThread | () | Constructor |
public function AsyncThread()| create | () | method |
public static function create(func:Function, args:Array = null):AsyncThreadCreates 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) |
AsyncThread —
|
| queue | () | method |
public static function queue(func:Function, args:Array = null):voidEven 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):voidWill 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):voidA 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| complete | Event |
flash.events.Eventflash.events.Event.COMPLETE
| started | Event |
flash.events.Event| STARTED | Constant |
public static const STARTED:String = started