Packagecom.sibirjak.angara.monitor
Interfacepublic interface IMonitor extends IProgressInfo, flash.events.IEventDispatcher
ImplementorsMonitor

A monitor encapsulates the progress calculation of a sequence of loader items.

A monitor returns the overall progress of its containing loader items.

It is possible to add loader items cross over their assignment to the loader manager, to a sequence or a sequence manager.

The monitor listens to progress and complete events of its loader items and updates its internal progress information simultaneously.



Public Properties
 PropertyDefined by
 InheritednumItems : uint
Returns the number of items to be loaded within the loader item.
IProgressInfo
 InheritednumItemsFailed : uint
Returns the number of items failed within the loader item.
IProgressInfo
 InheritednumItemsLoaded : uint
Returns the number of items loaded within the loader item.
IProgressInfo
 Inheritedprogress : Number
Returns the progress of the loader item as a decimal value between zero and 1.
IProgressInfo
Public Methods
 MethodDefined by
  
add(loaderItem:ILoaderItem, weight:uint = 0):void
Adds a loader item to a progress monitor.
IMonitor
  
clear():void
Removes all loader item references from the progress monitor.
IMonitor
  
remove(loaderItem:ILoaderItem):void
Removes a loader item from the progress monitor.
IMonitor
Method detail
add()method
public function add(loaderItem:ILoaderItem, weight:uint = 0):void

Adds a loader item to a progress monitor.

You can add any loader item type (resource loader, sequence, sequence manager).

If no weight parameter is given, the monitor uses the items.numItems property for the weight. Adding one resource loader and a sequence of 3 items would this way result in a cumulative weight of 4. Finishing the sequence would change the monitor's progress to .75 then.

Parameters
loaderItem:ILoaderItem — The loader item to be monitored.
 
weight:uint (default = 0) — The weight of the item within all monitor item's
clear()method 
public function clear():void

Removes all loader item references from the progress monitor.

remove()method 
public function remove(loaderItem:ILoaderItem):void

Removes a loader item from the progress monitor.

Parameters
loaderItem:ILoaderItem — The loader to be removed.