Packagecom.sibirjak.angara.core
Classpublic class AbstractLoaderItem
InheritanceAbstractLoaderItem Inheritance AbstractProgressInfo Inheritance flash.events.EventDispatcher
ImplementsILoaderItem
SubclassesAbstractResourceLoader, Sequence, SequenceManager

Abstract implementation of the ILoaderItem interface.



Public Properties
 PropertyDefined by
  itemType : String
[read-only] The type of the loader item.
AbstractLoaderItem
  key : String
Returns the identifying key of the loader item.
AbstractLoaderItem
 InheritednumItems : uint
Returns the number of items to be loaded within the loader item.
AbstractProgressInfo
 InheritednumItemsFailed : uint
Returns the number of items failed within the loader item.
AbstractProgressInfo
 InheritednumItemsLoaded : uint
Returns the number of items loaded within the loader item.
AbstractProgressInfo
 Inheritedprogress : Number
Returns the progress of the loader item as a decimal value between zero and 1.
AbstractProgressInfo
  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.
AbstractLoaderItem
  status : String
[read-only] The current loading status.
AbstractLoaderItem
Protected Properties
 PropertyDefined by
  _isScheduled : Boolean = false
The schedule marker.
AbstractLoaderItem
  _key : String
The key used for debugging purposes.
AbstractLoaderItem
 Inherited_numItems : uint = 0
The number of items added.
AbstractProgressInfo
 Inherited_numItemsFailed : uint = 0
The number of items failed loading.
AbstractProgressInfo
 Inherited_numItemsLoaded : uint = 0
The number of items alredy loaded.
AbstractProgressInfo
 Inherited_progress : Number = 0
The overall progress of the item.
AbstractProgressInfo
  _status : String
The loader item status.
AbstractLoaderItem
  _type : String
The loader item type.
AbstractLoaderItem
Public Methods
 MethodDefined by
  
pause():void
Marks the item to be ignored by subsequent loader manager queue pulling operations.
AbstractLoaderItem
  
resume():void
Marks a prior paused item to be eligible for loader manager queue polling operations.
AbstractLoaderItem
  
stop():void
Immediately stops loading of the item or its containing items.
AbstractLoaderItem
Property detail
_isScheduledproperty
protected var _isScheduled:Boolean = false

The schedule marker.

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 
protected var _key:String

The key used for debugging purposes.

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 
protected var _status:String

The loader item status.

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
_typeproperty 
protected var _type:String

The loader item type.

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.

setScheduled()method 
sibirjak_loader function setScheduled(scheduled:Boolean):void

Framework internal method to modify a loader item status crossover the class visibility.

Parameters
scheduled:Boolean
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.