| Package | ch.capi.net |
| Interface | public interface ICompositeMassLoader extends IGlobalEventDispatcher , IEventDispatcher |
| Implementors | CompositeMassLoader |
IMassLoader encapsulator to avoid too much code.
| Property | Defined By | ||
|---|---|---|---|
| massLoader : IMassLoader [read-only]
Defines the IMassLoader used. | ICompositeMassLoader | ||
| name : String [read-only]
Defines the name of the ICompositeMassLoader. | ICompositeMassLoader | ||
| Method | Defined By | ||
|---|---|---|---|
addFile(fileOrURL:Object, fileType:String = null, priority:Function = null, onOpen:Function = null, onProgress:Function = null, onComplete:Function = null, onClose:Function = null, onIOError:Function = null, onSecurityError:* = null):ILoadableFile
Creates a ILoadableFile from a url and add it to the current loading queue. | ICompositeMassLoader | ||
clear(destroyAll:Boolean = true):void
Clears the loading queue of the IMassLoader and empty the references to the
created ILoadableFile instances. | ICompositeMassLoader | ||
createFile(fileOrURL:Object, fileType:String = null, onOpen:Function = null, onProgress:Function = null, onComplete:Function = null, onClose:Function = null, onIOError:Function = null, onSecurityError:Function = null):ILoadableFile
Creates a ILoadableFile from a url. | ICompositeMassLoader | ||
getFileAt(index:uint):ILoadableFile
Retrieves the ILoadableFile at the specified index. | ICompositeMassLoader | ||
getFileByProps(props:Object, strict:Boolean = false):ILoadableFile
Retrieves the first file that matches the specified properties. | ICompositeMassLoader | ||
getFileCount():uint
Retrieves the number of ILoadableFile instances that have been stored. | ICompositeMassLoader | ||
getFiles():Array
Retrieves all the files created by the ICompositeMassLoader. | ICompositeMassLoader | ||
getFilesByProps(props:Object, strict:Boolean = false):Array
Retrieves all the files that matche the specified properties. | ICompositeMassLoader | ||
start(noCache:Boolean = false):void
Starts the loading of the massive loader. | ICompositeMassLoader | ||
stop():void
Stops the loading of the massive loader. | ICompositeMassLoader | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the download operation stops. | ICompositeMassLoader | |||
| Dispatched after all the files have been downloaded, even if errors occured. | ICompositeMassLoader | |||
| Dispatched when the loading of a ILoadManager is closed (eg when the loading is complete or an error has occured). | ICompositeMassLoader | |||
| Dispatched when the MassLoader starts the loading of a file. | ICompositeMassLoader | |||
| Dispatched when the loading of a ILoadManager progresses. | ICompositeMassLoader | |||
| Dispatched when the download operation commences following a call to the MassLoader.start() method. | ICompositeMassLoader | |||
| Dispatched when the loading of files with a lower priority starts. | ICompositeMassLoader | |||
| Dispatched when data is received as the download operation progresses. | ICompositeMassLoader | |||
| massLoader | property |
massLoader:IMassLoader [read-only]
Defines the IMassLoader used.
public function get massLoader():IMassLoader| name | property |
name:String [read-only]
Defines the name of the ICompositeMassLoader. If the name is
null, then the ICompositeMassLoader is not registered
in the global map.
public function get name():StringSee also
| addFile | () | method |
public function addFile(fileOrURL:Object, fileType:String = null, priority:Function = null, onOpen:Function = null, onProgress:Function = null, onComplete:Function = null, onClose:Function = null, onIOError:Function = null, onSecurityError:* = null):ILoadableFile
Creates a ILoadableFile from a url and add it to the current loading queue. If the fileOrURL parameter is an object,
all the properties will be put in the ILoadableFile.properties attribute of the created ILoadableFile.
Parameters
fileOrURL:Object — The url of the file or an Object containing at least the 'url' attribute.
| |
fileType:String (default = null) — The priority of the file (must be an int). If not defined and the fileOrURL parameter is an Object, then
the priority of the file will be extracted from the attribute 'priority'. If no priority is specified, then the
priority will be 0.
| |
priority:Function (default = null) — The type of the file. If not defined and the fileOrURL parameter is an Object, then
the type will be extracted from the attribute 'type'.
| |
onOpen:Function (default = null) — The Event.OPEN listener.
| |
onProgress:Function (default = null) — The ProgressEvent.PROGRESS listener.
| |
onComplete:Function (default = null) — The Event.COMPLETE listener.
| |
onClose:Function (default = null) — The Event.CLOSE listener.
| |
onIOError:Function (default = null) — The IOErrorEvent.IO_ERROR listener.
| |
onSecurityError:* (default = null) — The SecurityErrorEvent.SECURITY_ERROR listener.
|
ILoadableFile — The created ILoadableFile.
|
ArgumentError If — fileOrURl is null.
| |
ArgumentError If — the priority is invalid.
|
See also
| clear | () | method |
public function clear(destroyAll:Boolean = true):void
Clears the loading queue of the IMassLoader and empty the references to the
created ILoadableFile instances.
Parameters
destroyAll:Boolean (default = true) — Defines if the CompositeMassLoader must destroy all the
files before clearing them.
|
See also
| createFile | () | method |
public function createFile(fileOrURL:Object, fileType:String = null, onOpen:Function = null, onProgress:Function = null, onComplete:Function = null, onClose:Function = null, onIOError:Function = null, onSecurityError:Function = null):ILoadableFile
Creates a ILoadableFile from a url.
Parameters
fileOrURL:Object — The url of the file or an Object containing at least the 'url' attribute.
| |
fileType:String (default = null) — The type of the file. If not defined and the fileOrURL parameter is an Object, then
the type will be extracted from the attribute 'type'.
| |
onOpen:Function (default = null) — The Event.OPEN listener.
| |
onProgress:Function (default = null) — The ProgressEvent.PROGRESS listener.
| |
onComplete:Function (default = null) — The Event.COMPLETE listener.
| |
onClose:Function (default = null) — The Event.CLOSE listener.
| |
onIOError:Function (default = null) — The IOErrorEvent.IO_ERROR listener.
| |
onSecurityError:Function (default = null) — The SecurityErrorEvent.SECURITY_ERROR listener.
|
ILoadableFile — The created ILoadableFile.
|
ArgumentError if — the fileOrURL parameter is not defined.
|
See also
| getFileAt | () | method |
public function getFileAt(index:uint):ILoadableFile
Retrieves the ILoadableFile at the specified index.
Parameters
index:uint — The index.
|
ILoadableFile — The ILoadableFile.
|
| getFileByProps | () | method |
public function getFileByProps(props:Object, strict:Boolean = false):ILoadableFileRetrieves the first file that matches the specified properties.
Parameters
props:Object — An Object containing the properties to match.
| |
strict:Boolean (default = false) — Defines if the check must be strict or not.
|
ILoadableFile — The first ILoadableFile instance that matches the properties
or null.
|
See also
| getFileCount | () | method |
public function getFileCount():uint
Retrieves the number of ILoadableFile instances that have been stored.
uint — The number of stored ILoadableFile.
|
| getFiles | () | method |
public function getFiles():Array
Retrieves all the files created by the ICompositeMassLoader. Note that the ICompositeMassLoader
register the files only if the keepFiles property is set to true.
Array — The created ILoadableFile.
|
| getFilesByProps | () | method |
public function getFilesByProps(props:Object, strict:Boolean = false):ArrayRetrieves all the files that matche the specified properties.
Parameters
props:Object — An Object containing the properties to match.
| |
strict:Boolean (default = false) — Defines if the check must be strict or not.
|
Array — An Array of ILoadableFile that match the
specified properties.
|
See also
| start | () | method |
public function start(noCache:Boolean = false):voidStarts the loading of the massive loader.
Parameters
noCache:Boolean (default = false) — If true, then all the files contained in this
ICompositeMassLoader will be added back in the IMassLoader
to be reloaded. This cache has nothing to do with the useCache
property of a ILoadableFile.
|
See also
| stop | () | method |
| close | Event |
flash.events.Eventflash.events.Event.CLOSE
Dispatched when the download operation stops. This is following a call to the MassLoader.stop()
method.
See also
| complete | Event |
flash.events.Eventflash.events.Event.COMPLETEDispatched after all the files have been downloaded, even if errors occured.
See also
| fileClose | Event |
ch.capi.events.MassLoadEventch.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).
See also
| fileOpen | Event |
ch.capi.events.MassLoadEventch.capi.events.MassLoadEvent.FILE_OPEN
Dispatched when the MassLoader starts the loading of a file. This event
is dispatched just before the ILoadManager.start() method is called.
See also
| fileProgress | Event |
ch.capi.events.MassLoadEventch.capi.events.MassLoadEvent.FILE_PROGRESS
Dispatched when the loading of a ILoadManager progresses.
| open | Event |
flash.events.Eventflash.events.Event.OPEN
Dispatched when the download operation commences following a call to the MassLoader.start()
method.
See also
| priorityChanged | Event |
ch.capi.events.PriorityEventch.capi.events.PriorityEvent.PRIORITY_CHANGEDDispatched when the loading of files with a lower priority starts.
Event when the priority changes.See also
| progress | Event |
flash.events.ProgressEventflash.events.ProgressEvent.PROGRESS
Dispatched when data is received as the download operation progresses. The bytesTotal and bytesLoaded
value are based on the overall progressing of the files stored in the loading queue. If the bytesTotal of a
ILoadableFile has not been retrieved, then the virtualBytesTotal value will be used.
See also