Packagecom.sibirjak.angara.sequence
Interfacepublic interface ISequenceManager extends ILoaderItem, IProgressInfo, flash.events.IEventDispatcher, org.as3commons.collections.framework.IIterable
ImplementorsSequenceManager

The sequence manager is a convenient class to group and manage the behaviour of a list of sequences.

The sequence manager can be added to the loader manager the same way as resource loaders or sequences.

In certain situations we only want one out of a list of sequences to be loading. This might be a tab bar, where the assets of only the visible tab should be loading. If the use changes the visible tab, the loading of the former active tab should be stopped or delayed. In such a case we can call pauseAllExcept() or loadBeforeOthers() to stop or reprioritise the sequences of the invisible tabs.



Public Properties
 PropertyDefined by
 InheriteditemType : String
The type of the loader item.
ILoaderItem
 Inheritedkey : 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
 Inheritedscheduled : Boolean
Returns true, if the item already has been added to the loader manager directly or to a sequence or a sequence manager.
ILoaderItem
 Inheritedstatus : String
The current loading status.
ILoaderItem
Public Methods
 MethodDefined by
  
add(sequence:ISequence):void
Adds a sequence to a sequence manager.
ISequenceManager
  
clear():void
Stops all loaders and removes all sequence references from the manager.
ISequenceManager
  
loadBeforeOthers(sequence:ISequence):void
Reprioritised a sequence to be loaded before all other sequences in a sequence manager.
ISequenceManager
 Inherited
pause():void
Marks the item to be ignored by subsequent loader manager queue pulling operations.
ILoaderItem
  
pauseAllExcept(sequence:ISequence):void
Pauses all other sequences and resumes the specified sequence.
ISequenceManager
  
remove(sequence:ISequence):void
Removes a sequence from a sequence manager.
ISequenceManager
 Inherited
resume():void
Marks a prior paused item to be eligible for loader manager queue polling operations.
ILoaderItem
 Inherited
stop():void
Immediately stops loading of the item or its containing items.
ILoaderItem
Method detail
add()method
public function add(sequence:ISequence):void

Adds a sequence to a sequence manager.

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

Parameters
sequence:ISequence — The sequence to manage within this manager.
clear()method 
public function clear():void

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

loadBeforeOthers()method 
public function loadBeforeOthers(sequence:ISequence):void

Reprioritised a sequence to be loaded before all other sequences in a sequence manager.

Parameters
sequence:ISequence — The sequence to load before other sequences.
pauseAllExcept()method 
public function pauseAllExcept(sequence:ISequence):void

Pauses all other sequences and resumes the specified sequence.

Does not stop resource loaders of other sequences. Sequence will therefore resume loading not before all loaders of other sequences are finished (complete or failure). Parameters

sequence:ISequence — The sequence to resume while all others gets paused.
remove()method 
public function remove(sequence:ISequence):void

Removes a sequence from a sequence manager.

Parameters
sequence:ISequence — The sequence to remove from the manager.