Packagecom.sibirjak.angara.core
Interfacepublic interface ILoaderItem extends IProgressInfo, flash.events.IEventDispatcher
SubinterfacesIResourceLoader, ISequence, ISequenceManager
ImplementorsAbstractLoaderItem

The internal loader item type. A loader item can be either a resource loader, a sequence or a sequence manager.

A loader item can be added or removed from the loader manager, provides information about its loading status and progress and offers operations to stop and resume loading.



Public Properties
 PropertyDefined by
  itemType : String
[read-only] The type of the loader item.
ILoaderItem
  key : String
Returns the identifying key of the loader item.
ILoaderItem
 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
  scheduled : Boolean
[read-only] Returns true, if the item already has been added to the loader manager directly or to a sequence or a sequence manager.
ILoaderItem
  status : String
[read-only] The current loading status.
ILoaderItem
Public Methods
 MethodDefined by
  
pause():void
Marks the item to be ignored by subsequent loader manager queue pulling operations.
ILoaderItem
  
resume():void
Marks a prior paused item to be eligible for loader manager queue polling operations.
ILoaderItem
  
stop():void
Immediately stops loading of the item or its containing items.
ILoaderItem
Property detail
itemTypeproperty
itemType:String  [read-only]

The type of the loader item.

The type can be either LoaderItemType.LOADER, LoaderItemType.SEQUENCE or LoaderItemType.SEQUENCE_MANAGER.

A loader item is supposed to dispatch an event if it should be removed from the loader manager queue (LoaderItemEvent.COMPLETE, LoaderItemEvent.FAILURE) and an event to notify the loader manager to continue loading (LoaderItemEvent.RESUME).

Implementation
    public function get itemType():String
keyproperty 
key:String  [read-write]

Returns the identifying key of the loader item.

Implementation
    public function get key():String
    public function set key(value:String):void
scheduledproperty 
scheduled:Boolean  [read-only]

Returns true, if the item already has been added to the loader manager directly or to a sequence or a sequence manager.

A scheduled item cannot be added twice to any of the loader item containers (loader manager, sequence, sequence manager). It has to be removed from its current container beforehand.

Implementation
    public function get scheduled():Boolean
statusproperty 
status:String  [read-only]

The current loading status.

The initial status is LoaderItemStatus.WAITING for every loader item instance. Once the status is set to LoaderItemStatus.COMPLETE or LoaderItemStatus.FAILURE, the status won't be changed any more.

Implementation
    public function get status():String
Method detail
pause()method
public function pause():void

Marks the item to be ignored by subsequent loader manager queue pulling operations.

Sets the items status to LoaderItemStatus.PAUSED. Does only have effect to items which status is LoaderItemStatus.WAITING. You cannot pause a loading or finished item. To interrupt loading you need to call stop() for the particular item.

If the item is of type LoaderItemType.SEQUENCE, only the sequence will be marked as paused.

If the item is of type LoaderItemType.SEQUENCE_MANAGER, only the sequence manager will be marked as paused.

resume()method 
public function resume():void

Marks a prior paused item to be eligible for loader manager queue polling operations.

Sets the items status to LoaderItemStatus.WAITING. Does only have effect to items which status is LoaderItemStatus.PAUSED.

If the item is of type LoaderItemType.SEQUENCE, only the sequence's status will be affected.

If the item is of type LoaderItemType.SEQUENCE_MANAGER, only the sequence manager's status will be affected.

stop()method 
public function stop():void

Immediately stops loading of the item or its containing items.

If the item is of type LoaderItemType.LOADER and is currently being loading, the associated net connection will be closed. Does only have effect to resource loaders, which status is LoaderItemStatus.LOADING. Sets the loader status back to LoaderItemStatus.WAITING. You cannot stop finished loaders (LoaderItemStatus.COMPLETE, LoaderItemStatus.FAILURE) any more.

If the item is of type LoaderItemType.SEQUENCE, all open loaders assigned to the seqeunce will be stopped.

If the item is of type LoaderItemType.SEQUENCE_MANAGER, the stop method of all assigned sequences will be called.