Package | com.sibirjak.angara.sequence |
Class | public class Sequence |
Inheritance | Sequence ![]() ![]() ![]() |
Implements | ISequence |
Subclasses | PagedSequence |
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.
Method | Defined by | ||
---|---|---|---|
Sequence()
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 |
Method | Defined by | ||
---|---|---|---|
dispatchAdd(resourceLoader:IResourceLoader):void
Dispatches the SequenceEvent.ADD event.
| Sequence | ||
dispatchComplete():void
Dispatches the SequenceEvent.COMPLETE event.
| Sequence | ||
dispatchPause():void
Dispatches the SequenceEvent.PAUSE event.
| Sequence | ||
dispatchProgress():void
Dispatches the SequenceEvent.PROGRESS event.
| Sequence | ||
dispatchRemove(resourceLoader:IResourceLoader):void
Dispatches the SequenceEvent.REMOVE event.
| Sequence | ||
dispatchResume():void
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 | ||
sequenceComplete():void
Template method to notify subclasses after the internal monitor has been completed
but before the sequence dispatches its COMPLETE event.
| Sequence |
Sequence | () | constructor |
public function Sequence()
Creates a new sequence.
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.
ParametersresourceLoader: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.
ParametersresourceLoader: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.
ParametersresourceLoader: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.
Parameterscursor:* — Not supported.
|
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.
ParametersresourceLoader:IResourceLoader |
loaderFinished | () | method |
protected function loaderFinished(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource has been finished.
ParametersresourceLoader:IResourceLoader |
loaderPaused | () | method |
protected function loaderPaused(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource has been paused.
ParametersresourceLoader:IResourceLoader |
loaderRemoved | () | method |
protected function loaderRemoved(resourceLoader:IResourceLoader):void
Template method to notify subclasses after a resource loader has been removed.
ParametersresourceLoader: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.
ParametersresourceLoader: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.
ParametersresourceLoader: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
ReturnsString |