Packagech.capi.net
Interfacepublic interface IMassLoader extends ILoadManager , IGlobalEventDispatcher , IEventDispatcher
Implementors ApplicationMassLoader, MassLoader, PriorityMassLoader

Represents a massive loader. This interface represents objects that manages the loading of many files.

See also

LoadableFileFactory
CompositeMassLoader


Public Properties
 PropertyDefined By
 InheritedbytesLoaded : uint
[read-only] Defines the bytes that have been loaded.
ILoadManager
 InheritedbytesTotal : uint
[read-only] Defines the total bytes to load.
ILoadManager
 InheritedcloseEvent : Event
[read-only] Defines the event that happend to close the file (Event.CLOSE, Event.COMPLETE, ...).
ILoadManager
 Inheritedloaded : Boolean
[read-only] Defines if the ILoadManager operation is complete.
ILoadManager
  loadInfo : ILoadInfo
[read-only] Defines the ILoadInfo object linked to the IMassLoader.
IMassLoader
  loadPolicy : ILoadPolicy
Defines the ILoadPolicy to use.
IMassLoader
  numFiles : uint
[read-only] Defines the total of the files in the IMassLoader.
IMassLoader
  numFilesLoaded : uint
[read-only] Defines the number of files loaded.
IMassLoader
  numFilesLoading : uint
[read-only] Defines the number of files being currently loaded.
IMassLoader
  numFilesOpen : uint
[read-only] Defines the number of files being currently open.
IMassLoader
  numFilesToLoad : uint
[read-only] Defines the number of files to load.
IMassLoader
  parallelFiles : uint
Defines the number of files that will be loaded simultaneously.
IMassLoader
 InheritedstateIdle : Boolean
[read-only] Defines if the ILoadManager is idle.
ILoadManager
 InheritedstateLoading : Boolean
[read-only] Defines if the ILoadManager is loading.
ILoadManager
Public Methods
 MethodDefined By
  
Add a file to the loading queue.
IMassLoader
  
clear():void
Empty the loading queue.
IMassLoader
  
Get the number of files to be loaded.
IMassLoader
  
getFiles():Array
Get the files that will be loaded.
IMassLoader
  
Removes a file from the loading queue.
IMassLoader
 Inherited
start():Boolean
Starts downloading data from the specified URL.
ILoadManager
 Inherited
stop():void
Stops the load operation in progress.
ILoadManager
Events
 Event Summary Defined By
  Dispatched when the loading of a ILoadManager is closed (eg when the loading is complete or an error has occured).IMassLoader
  Dispatched when the IMassLoader starts the loading of a file.IMassLoader
  Dispatched when the loading of a ILoadManager progresses.IMassLoader
Property Detail
loadInfoproperty
loadInfo:ILoadInfo  [read-only]

Defines the ILoadInfo object linked to the IMassLoader.


Implementation
    public function get loadInfo():ILoadInfo
loadPolicyproperty 
loadPolicy:ILoadPolicy  [read-write]

Defines the ILoadPolicy to use.


Implementation
    public function get loadPolicy():ILoadPolicy
    public function set loadPolicy(value:ILoadPolicy):void
numFilesproperty 
numFiles:uint  [read-only]

Defines the total of the files in the IMassLoader. This value will remain correct even if files are added during the loading.


Implementation
    public function get numFiles():uint
numFilesLoadedproperty 
numFilesLoaded:uint  [read-only]

Defines the number of files loaded. This value contains also the files that have not been loaded successfully.


Implementation
    public function get numFilesLoaded():uint
numFilesLoadingproperty 
numFilesLoading:uint  [read-only]

Defines the number of files being currently loaded. This value does not take care if the Event.OPEN event of each file has been launched. It is based on the MassLoadEvent.FILE_OPEN event.


Implementation
    public function get numFilesLoading():uint

See also

numFilesOpenproperty 
numFilesOpen:uint  [read-only]

Defines the number of files being currently open. This value is based on the files that have sent the Event.OPEN event.


Implementation
    public function get numFilesOpen():uint

See also

numFilesToLoadproperty 
numFilesToLoad:uint  [read-only]

Defines the number of files to load. Once a file start its loading, it is no considered in this value anymore.


Implementation
    public function get numFilesToLoad():uint
parallelFilesproperty 
parallelFiles:uint  [read-write]

Defines the number of files that will be loaded simultaneously. If the value is changed during a load process, this won't affect it.


Implementation
    public function get parallelFiles():uint
    public function set parallelFiles(value:uint):void
Method Detail
addFile()method
public function addFile(file:ILoadManager):void

Add a file to the loading queue. If the file is already in the loading queue, then a flash.errors.IllegalOperationError will be thrown.

Parameters

file:ILoadManager — The file to add.


Throws
flash.errors:IllegalOperationError If — the file is already in the loading queue.

See also

clear()method 
public function clear():void

Empty the loading queue.

getFileCount()method 
public function getFileCount():uint

Get the number of files to be loaded.

Returns
uint — The number of file to load.
getFiles()method 
public function getFiles():Array

Get the files that will be loaded.

Returns
Array — An Array containing the files to load.
removeFile()method 
public function removeFile(file:ILoadManager):void

Removes a file from the loading queue. If the file is not in the loading queue, then a flash.errors.IllegalOperationError will be thrown.

Parameters

file:ILoadManager — The file to remove.


Throws
flash.errors:IllegalOperationError If — the file is not in the loading queue.
Event Detail
fileClose Event
Event Object Type: ch.capi.events.MassLoadEvent
MassLoadEvent.type property = ch.capi.events.MassLoadEvent.FILE_CLOSE

Dispatched when the loading of a ILoadManager is closed (eg when the loading is complete or an error has occured).

Event when the loading of a file stops.
fileOpen Event  
Event Object Type: ch.capi.events.MassLoadEvent
MassLoadEvent.type property = ch.capi.events.MassLoadEvent.FILE_OPEN

Dispatched when the IMassLoader starts the loading of a file. This event is dispatched just before the ILoadManager.start() method is called.

Event when the loading of a file starts.
fileProgress Event  
Event Object Type: ch.capi.events.MassLoadEvent
MassLoadEvent.type property = ch.capi.events.MassLoadEvent.FILE_PROGRESS

Dispatched when the loading of a ILoadManager progresses.

Event when the loading of a file progresses.