Packagesandy.util
Classpublic class LoaderQueue
InheritanceLoaderQueue Inheritance flash.events.EventDispatcher

Utility class for loading resources.

A LoaderQueue allows you to queue up requests for loading external resources.



Public Properties
 PropertyDefined by
  data : Dictionary
A list of all resources indexed by their names.
LoaderQueue
Public Methods
 MethodDefined by
  
Creates a new loader queue.
LoaderQueue
  
add(p_sID:String, p_oURLRequest:URLRequest):void
Adds a new request to this loader queue.
LoaderQueue
  
start():void
Starts the loading of all resources in the queue.
LoaderQueue
Events
 EventSummaryDefined by
   Dispatched when a resource has been loaded.LoaderQueue
   Dispatched when an error is encountered while loading a resource.LoaderQueue
Property detail
dataproperty
public var data:Dictionary

A list of all resources indexed by their names.

Constructor detail
LoaderQueue()constructor
public function LoaderQueue()

Creates a new loader queue.

Method detail
add()method
public function add(p_sID:String, p_oURLRequest:URLRequest):void

Adds a new request to this loader queue.

The request is given its own loader and is added to a loader queue
The loding is postponed until the start method of the queue is called.

Parameters
p_sID:String — A string identifier for this request
 
p_oURLRequest:URLRequest — The request
start()method 
public function start():void

Starts the loading of all resources in the queue.

All loaders in the queue are started and IOErrorEvent and the COMPLETE event are subscribed to.

Event detail
queueCompleteevent 
Event object type: sandy.events.QueueEvent
QueueEvent.type property = sandy.events.QueueEvent.QUEUE_COMPLETE

Dispatched when a resource has been loaded.

Defines the value of the type property of a queueComplete event object.

queueLoaderErrorevent  
Event object type: sandy.events.QueueEvent
QueueEvent.type property = sandy.events.QueueEvent.QUEUE_LOADER_ERROR

Dispatched when an error is encountered while loading a resource.

Defines the value of the type property of a queueLoaderError event object.