Packagecom.sibirjak.angara.sequence
Classpublic class Sequence
InheritanceSequence Inheritance AbstractLoaderItem Inheritance AbstractProgressInfo Inheritance flash.events.EventDispatcher
ImplementsISequence
SubclassesPagedSequence

A sequence is a list of resource loaders.

Finished loaders will be removed from the internal loader list and therefore won't be considered in enumeration using the sequence's iterator. However they will be still counted in the numItems property.



Public Properties
 PropertyDefined by
 InheriteditemType : String
The type of the loader item.
AbstractLoaderItem
 Inheritedkey : 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
 Inheritedscheduled : Boolean
Returns true, if the item already has been added to the loader manager directly or to a sequence or a sequence manager.
AbstractLoaderItem
 Inheritedstatus : String
The current loading status.
AbstractLoaderItem
Protected Properties
 PropertyDefined by
 Inherited_isScheduled : Boolean = false
The schedule marker.
AbstractLoaderItem
 Inherited_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
 Inherited_status : String
The loader item status.
AbstractLoaderItem
 Inherited_type : String
The loader item type.
AbstractLoaderItem
Public Methods
 MethodDefined by
  
Creates a new sequence.
Sequence
  
add(resourceLoader:IResourceLoader, weight:uint = 0):void
Adds a new resource loader to the sequence.
Sequence
  
clear():void
Stops all loaders and removes all loader references from the sequence.
Sequence
  
iterator(cursor:*):IIterator
Returns an iterator over all resource loaders left.
Sequence
  
pause():void
Marks the item to be ignored by subsequent loader manager queue pulling operations.
Sequence
  
remove(resourceLoader:IResourceLoader):void
Removes a loader from a sequence.
Sequence
  
resume():void
Marks a prior paused item to be eligible for loader manager queue polling operations.
Sequence
  
stop():void
Immediately stops loading of the item or its containing items.
Sequence
  
toString():String
Info
Sequence
Protected Methods
 MethodDefined by
  
dispatchAdd(resourceLoader:IResourceLoader):void
Dispatches the SequenceEvent.ADD event.
Sequence
  
Dispatches the SequenceEvent.COMPLETE event.
Sequence
  
Dispatches the SequenceEvent.PAUSE event.
Sequence
  
Dispatches the SequenceEvent.PROGRESS event.
Sequence
  
dispatchRemove(resourceLoader:IResourceLoader):void
Dispatches the SequenceEvent.REMOVE event.
Sequence
  
Dispatches the SequenceEvent.RESUME event.
Sequence
  
dispatchStop():void
Dispatches the SequenceEvent.STOP event.
Sequence
  
loaderAdded(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource loader has been added but before the sequence dispatches the ADD event.
Sequence
  
loaderFinished(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource has been finished.
Sequence
  
loaderPaused(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource has been paused.
Sequence
  
loaderRemoved(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource loader has been removed.
Sequence
  
loaderResumed(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource has been resumed but before the sequence dispatches its RESUME event.
Sequence
  
Template method to notify subclasses after the internal monitor has been completed but before the sequence dispatches its COMPLETE event.
Sequence
Constructor detail
Sequence()constructor
public function Sequence()

Creates a new sequence.

Method detail
add()method
public function add(resourceLoader:IResourceLoader, weight:uint = 0):void

Adds a new resource loader to the sequence.

Its possible to add resource at any time of loading to a sequence but not after the sequence has been marked as complete.

Parameters
resourceLoader:IResourceLoader — The resource loader to add.
 
weight:uint (default = 0)
clear()method 
public function clear():void

Stops all loaders and removes all loader references from the sequence.

dispatchAdd()method 
protected function dispatchAdd(resourceLoader:IResourceLoader):void

Dispatches the SequenceEvent.ADD event.

Parameters
resourceLoader:IResourceLoader
dispatchComplete()method 
protected function dispatchComplete():void

Dispatches the SequenceEvent.COMPLETE event.

dispatchPause()method 
protected function dispatchPause():void

Dispatches the SequenceEvent.PAUSE event.

dispatchProgress()method 
protected function dispatchProgress():void

Dispatches the SequenceEvent.PROGRESS event.

dispatchRemove()method 
protected function dispatchRemove(resourceLoader:IResourceLoader):void

Dispatches the SequenceEvent.REMOVE event.

Parameters
resourceLoader:IResourceLoader
dispatchResume()method 
protected function dispatchResume():void

Dispatches the SequenceEvent.RESUME event.

dispatchStop()method 
protected function dispatchStop():void

Dispatches the SequenceEvent.STOP event.

iterator()method 
public function iterator(cursor:*):IIterator

Returns an iterator over all resource loaders left.

Parameters
cursor:* — Not supported.

Returns
IIterator — Iterator over all left resource loaders.
loaderAdded()method 
protected function loaderAdded(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource loader has been added but before the sequence dispatches the ADD event.

Parameters
resourceLoader:IResourceLoader
loaderFinished()method 
protected function loaderFinished(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource has been finished.

Parameters
resourceLoader:IResourceLoader
loaderPaused()method 
protected function loaderPaused(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource has been paused.

Parameters
resourceLoader:IResourceLoader
loaderRemoved()method 
protected function loaderRemoved(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource loader has been removed.

Parameters
resourceLoader:IResourceLoader
loaderResumed()method 
protected function loaderResumed(resourceLoader:IResourceLoader):void

Template method to notify subclasses after a resource has been resumed but before the sequence dispatches its RESUME event.

Parameters
resourceLoader:IResourceLoader
pause()method 
public override 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.

remove()method 
public function remove(resourceLoader:IResourceLoader):void

Removes a loader from a sequence.

This will decrease the number of items by 1 and adjust the sequence's progress value.

Parameters
resourceLoader:IResourceLoader — The resource loader to remove.
resume()method 
public override 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.

sequenceComplete()method 
protected function sequenceComplete():void

Template method to notify subclasses after the internal monitor has been completed but before the sequence dispatches its COMPLETE event.

stop()method 
public override 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.

toString()method 
public override function toString():String

Info

Returns
String