Packagenet.guttershark.support.preloading.workers
Classpublic final class WorkerInstances

The WorkerInstances class is an instance factory that returns instances of workers based on a filetype being loaded.

This is used internally in an Asset. If you are adding any other types of assets to be preloaded

Default workers: bmp,jpg,jpeg,png,gif,swf,mp3,zip,xml,flv



Public Methods
 MethodDefined by
  
GetWorkerInstance(fileType:String):Worker
[static] Get an instance of the worker specified by type.
WorkerInstances
  
RegisterWorkerForFileType(fileType:String, workerKlass:Class):void
[static] Registers a worker for a file type.
WorkerInstances
Method detail
GetWorkerInstance()method
public static function GetWorkerInstance(fileType:String):Worker

Get an instance of the worker specified by type.

Parameters
fileType:String — The type of the worker. EX: 'bitmap', or 'swf', etc. The Worker must have been registered previously before getting an instnace of it.

Returns
Worker
RegisterWorkerForFileType()method 
public static function RegisterWorkerForFileType(fileType:String, workerKlass:Class):void

Registers a worker for a file type. The file type string should be a file extension less the period. EX: "jpg","jpeg", etc.

Parameters
fileType:String — The file type to register the worker too
 
workerKlass:Class — The worker class to use for the specified file type. This must be a class reference.