| Package | com.sibirjak.angara |
| Class | public class LoaderManager |
| Inheritance | LoaderManager flash.events.EventDispatcher |
| Implements | ILoaderManager |
| Property | Defined by | ||
|---|---|---|---|
| numItemsLeft : uint [read-only]
Returns the number of resources left to load.
| LoaderManager | ||
| status : String [read-only]
The current loader manager status.
| LoaderManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
LoaderManager(numConnections:uint = 1)
Creates a new LoaderManager instance.
| LoaderManager | ||
|
add(loaderItem:ILoaderItem, priority:uint = 0):void
Adds a new loader item to the queue.
| LoaderManager | ||
|
clear():void
Stops all loaders and removes all loader item references from the queue.
| LoaderManager | ||
|
createInstance(numConnections:uint = 1):ILoaderManager
[static]
Creates a new LoaderManager instance.
| LoaderManager | ||
|
destroyInstance():void
[static]
Sets the static instance to null.
| LoaderManager | ||
|
[static]
Returns a prior created LoaderManager instance.
| LoaderManager | ||
|
pause():void
Pauses the LoaderManager.
| LoaderManager | ||
|
remove(loaderItem:ILoaderItem):void
Removes a loader item from the queue.
| LoaderManager | ||
|
resume():void
Resumes the prior paused LoaderManager.
| LoaderManager | ||
|
stop():void
Stops all active net connections.
| LoaderManager | ||
|
toString():String
Info
| LoaderManager | ||
| numItemsLeft | property |
numItemsLeft:uint [read-only]Returns the number of resources left to load.
Adding 2 loader, finishing 1 loader will then return 1.
The value will be calculated at runtime with a worst complexity O(n) where n is the number of resource loaders added directly or to a container.
Implementation public function get numItemsLeft():uint
| status | property |
status:String [read-only]The current loader manager status.
The initial status is LoaderItemStatus.WAITING. Its possible to pause the loader manager, which will set the status to LoaderItemStatus.PAUSED.
Implementation public function get status():String
| LoaderManager | () | constructor |
public function LoaderManager(numConnections:uint = 1)Creates a new LoaderManager instance.
ParametersnumConnections:uint (default = 1) — The number of simultaneous http connections.
|
| add | () | method |
public function add(loaderItem:ILoaderItem, priority:uint = 0):voidAdds a new loader item to the queue.
The type can be either LoaderItemType.LOADER, LoaderItemType.SEQUENCE or LoaderItemType.SEQUENCE_MANAGER.
It is possible to specify a priority at which time the item should be loaded. Lesser priority value means sooner loading.
ParametersloaderItem:ILoaderItem — The item to add.
|
|
priority:uint (default = 0) — The priority to load the item.
|
| clear | () | method |
public function clear():voidStops all loaders and removes all loader item references from the queue.
| createInstance | () | method |
public static function createInstance(numConnections:uint = 1):ILoaderManagerCreates a new LoaderManager instance.
Has to be called at start of the application.
ParametersnumConnections:uint (default = 1) |
ILoaderManager |
| destroyInstance | () | method |
public static function destroyInstance():voidSets the static instance to null.
| getInstance | () | method |
public static function getInstance():ILoaderManagerReturns a prior created LoaderManager instance.
ReturnsILoaderManager |
| pause | () | method |
public function pause():voidPauses the LoaderManager.
Active connections won't be closed. Use pause() + stop() to close all connections and stop the loader manager.
| remove | () | method |
public function remove(loaderItem:ILoaderItem):voidRemoves a loader item from the queue.
The type can be either LoaderItemType.LOADER, LoaderItemType.SEQUENCE or LoaderItemType.SEQUENCE_MANAGER.
ParametersloaderItem:ILoaderItem — The item to remove.
|
| resume | () | method |
public function resume():voidResumes the prior paused LoaderManager.
| stop | () | method |
public function stop():voidStops all active net connections.
In order to stop the loader manager loading and pause you need to call pause() + stop().
| toString | () | method |
public override function toString():StringInfo
ReturnsString |