| Package | ch.capi.net |
| Class | public class CompositePriorityMassLoader |
| Inheritance | CompositePriorityMassLoader CompositeMassLoader |
IMassLoader and LoadableFileFactory to creates
the ILoadableFile and for the loading management.
The difference with the CompositeMassLoader is that this class uses directly a
PriorityMassLoader and provides some more methods to add the files.
var cm:CompositePriorityMassLoader = new CompositePriorityMassLoader();
cm.addPrioritizedFile("myAnimation.swf", 5);
cm.addFile("otherSWF.swf", LoadableFileType.BINARY); //priority = 0
cm.addPrioritizedFile("myVariables.php", 3, LoadableFileType.TEXT);
cm.start();
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | keepFiles : Boolean
Defines if the
CompositeMassLoader must keep references on the created
ILoadableFile instances. | CompositeMassLoader | |
![]() | loadableFileFactory : LoadableFileFactory
Defines the
LoadableFileFactory to use. | CompositeMassLoader | |
| massLoader : IMassLoader
Defines the
PriorityMassLoader to use. | CompositePriorityMassLoader | ||
| Method | Defined by | ||
|---|---|---|---|
|
CompositePriorityMassLoader(keepFiles:Boolean = true, massLoader:PriorityMassLoader = null, factory:LoadableFileFactory = null)
Creates a new
CompositePriorityMassLoader object. | CompositePriorityMassLoader | ||
![]() |
addFile(url:String, 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 and add it to the current loading queue. | CompositeMassLoader | |
|
addPrioritizedFile(url:String, priority:int, 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 and add it to the current loading queue. | CompositePriorityMassLoader | ||
|
addPrioritizedRequest(request:URLRequest, priority:int, 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 URLRequest and add it to the current loading queue. | CompositePriorityMassLoader | ||
![]() |
addRequest(request:URLRequest, 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 URLRequest and add it to the current loading queue. | CompositeMassLoader | |
![]() |
clear():void
Clears the loading queue of the
IMassLoader and empty the references to the
created ILoadableFile instances. | CompositeMassLoader | |
![]() |
createFile(url:String, 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. | CompositeMassLoader | |
![]() |
getFileAt(index:uint):ILoadableFile
Retrieves the
ILoadableFile at the specified index. | CompositeMassLoader | |
![]() |
getFileCount():uint
Retrieves the number of
ILoadableFile instances that have been stored. | CompositeMassLoader | |
![]() |
getFiles():Array
Retrieves all the files created by the
CompositeMassLoader. | CompositeMassLoader | |
![]() |
start():void
Starts the loading of the massive loader.
| CompositeMassLoader | |
![]() |
stop():void
Stops the loading of the massive loader.
| CompositeMassLoader | |
| massLoader | property |
massLoader:IMassLoader [read-write]
Defines the PriorityMassLoader to use. If the value is of another type, then
a ArgumentError will be thrown.
public function get massLoader():IMassLoader
public function set massLoader(value:IMassLoader):void
| CompositePriorityMassLoader | () | constructor |
public function CompositePriorityMassLoader(keepFiles:Boolean = true, massLoader:PriorityMassLoader = null, factory:LoadableFileFactory = null)
Creates a new CompositePriorityMassLoader object.
keepFiles:Boolean (default = true) — If the CompositeMassLoader must keep a reference on the created ILoadableFile instances.
|
|
massLoader:PriorityMassLoader (default = null) — The PriorityMassLoader to use.
|
|
factory:LoadableFileFactory (default = null) — The LoadableFileFactory to use.
|
See also
| addPrioritizedFile | () | method |
public function addPrioritizedFile(url:String, priority:int, 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 and add it to the current loading queue.
url:String — url The url of the file.
|
|
priority:int — The priority of the file.
|
|
fileType:String (default = null) — The type of the file.
|
|
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.
|
| addPrioritizedRequest | () | method |
public function addPrioritizedRequest(request:URLRequest, priority:int, 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 URLRequest and add it to the current loading queue.
request:URLRequest — The URLRequest.
|
|
priority:int — The priority of the file.
|
|
fileType:String (default = null) — The type of the file.
|
|
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.
|