Packagech.capi.core
Classpublic class ApplicationMassLoader
InheritanceApplicationMassLoader Inheritance PriorityMassLoader Inheritance MassLoader Inheritance flash.events.EventDispatcher
ImplementsIMassLoader

Manages the massive loading of ApplicationFile.

See also

ApplicationFile
ApplicationFileParser


Public Properties
 PropertyDefined by
 InheritedalwaysDispatchProgressEvent : Boolean = false
Defines if the progress event should be dispatched each time or only when all the number of specified parallel files are being loaded.
MassLoader
 InheritedbytesLoaded : uint
Defines the bytes that have been loaded.
MassLoader
 InheritedbytesTotal : uint
Defines the total bytes to load.
MassLoader
 InheritedcloseEvent : Event
Defines the event that happend to close the file (Event.CLOSE, Event.COMPLETE, ...).
MassLoader
 InheritedcurrentPriority : int
Defines the current priority of the files that are being loaded.
PriorityMassLoader
 InheriteddefaultPriority : int = 0
Defines the default priority to use for the addFile method.
PriorityMassLoader
 InheritedloadByPriority : Boolean = true
Defines if the loading is done by priority.
PriorityMassLoader
 InheritedloadInfo : ILoadInfo
Defines the ILoadInfo object linked to the IMassLoader.
MassLoader
 InheritedloadPolicy : ILoadPolicy
Defines the ILoadPolicy to use.
MassLoader
 InheritednextFileToLoad : ILoadManager
Defines the next file that will be extracted from the queue to be loaded.
MassLoader
 InheritednumFilesLoading : uint
Defines the number of files being currently loaded.
MassLoader
 InheritedparallelFiles : uint
Defines the number of files that will be loaded simultaneously.
MassLoader
 InheritedstateIdle : Boolean
Defines if the MassLoader is idle.
MassLoader
 InheritedstateLoading : Boolean
Defines if the MassLoader is loading.
MassLoader
 InheriteduseCache : Boolean
Defines if the MassLoader can use the cache or not.
MassLoader
Protected Properties
 PropertyDefined by
 Inheritedfiles : IList
Defines all the files that must be loaded.
MassLoader
 InheritedfilesLoading : IList
Defines the files that are currently being loaded.
MassLoader
 InheritedfilesQueue : IDataStructure
Defines the data structure to use for the file enqueuing.
MassLoader
Public Methods
 MethodDefined by
  
Creates a new ApplicationMassLoader object.
ApplicationMassLoader
  
addApplicationFile(file:ApplicationFile, priority:int = 0):void
Add the specified ApplicationFile and its dependencies.
ApplicationMassLoader
 Inherited
addFile(file:ILoadManager):void
Add the specified file into the loading queue with the specified defaultPriority.
PriorityMassLoader
  
addGlobalFiles(priority:int = 50, context:ApplicationContext = null):void
Add the global ApplicationFile into the loading queue.
ApplicationMassLoader
 Inherited
addPrioritizedFile(file:ILoadManager, priority:int = 0):void
Add a file with a specific priority into the loading queue.
PriorityMassLoader
 Inherited
clear():void
Empty the loading queue.
MassLoader
 Inherited
getFileCount():uint
Get the number of files to be loaded.
MassLoader
 Inherited
Retreives the priority of a ILoadManager object.
PriorityMassLoader
 Inherited
getFiles():Array
Get the files that will be loaded.
MassLoader
 Inherited
hasFile(file:ILoadManager):Boolean
Retrieves if a file is contained into the loading queue.
MassLoader
 Inherited
Removes the specified file from the loading queue.
PriorityMassLoader
 Inherited
start():void
Starts downloading data from the specified ILoadableFile objects.
MassLoader
 Inherited
stop():void
Stops the load operation in progress.
MassLoader
 Inherited
toString():String
Lists all the files contained into this PriorityMassLoader into a String.
PriorityMassLoader
Protected Methods
 MethodDefined by
  
addLoadableFile(file:ILoadableFile, priority:int):void
Add the specified ILoadableFile to the queue within the priority.
ApplicationMassLoader
 Inherited
isComplete():Boolean
Defines if the massive loading is complete.
MassLoader
 Inherited
loadFile(file:ILoadManager):Boolean
Start the loading of a file.
MassLoader
 Inherited
Start the loading of the next file.
MassLoader
 Inherited
onClose(evt:Event):void
Event.CLOSE listener.
MassLoader
 Inherited
onComplete(evt:Event):void
Event.COMPLETE listener.
MassLoader
 Inherited
onIOError(evt:IOErrorEvent):void
IOErrorEvent.IO_ERROR listener.
MassLoader
 Inherited
onOpen(evt:Event):void
Event.OPEN listener.
MassLoader
 Inherited
onProgress(evt:ProgressEvent):void
ProgressEvent.PROGRESS listener.
MassLoader
 Inherited
onSecurityError(evt:SecurityErrorEvent):void
SecurityError.SECURITY_ERROR listener.
MassLoader
 Inherited
processPolicy(file:ILoadManager, closeEvent:Event):ILoadManager
Processes the loading policy on the currently closed file.
MassLoader
 Inherited
Register the MassLoader to the specified ILoadManager object's events.
MassLoader
 Inherited
Determines which file must be loaded first.
PriorityMassLoader
 Inherited
startLoading():void
Start the loading of the files.
PriorityMassLoader
 Inherited
Unregister the MassLoader from the specified ILoadManager object's events.
MassLoader
 Inherited
updateBytes():void
Updates the bytesLoaded and bytesTotal values.
MassLoader
Events
 EventSummaryDefined by
 Inherited Dispatched when the download operation stops.MassLoader
 Inherited Dispatched after all the data is received.MassLoader
 Inherited Dispatched when the loading of a ILoadManager is closed (eg when the loading is complete or an error has occured).MassLoader
 Inherited Dispatched when the MassLoader starts the loading of a file.MassLoader
 Inherited Dispatched when the download operation commences following a call to the MassLoader.load() method.MassLoader
 Inherited Dispatched when the loading of files with a lower priority starts.PriorityMassLoader
 Inherited Dispatched when data is received as the download operation progresses.MassLoader
Constructor detail
ApplicationMassLoader()constructor
public function ApplicationMassLoader()

Creates a new ApplicationMassLoader object.

Method detail
addApplicationFile()method
public function addApplicationFile(file:ApplicationFile, priority:int = 0):void

Add the specified ApplicationFile and its dependencies.

Parameters
file:ApplicationFile — The ApplicationFile to add.
 
priority:int (default = 0) — The priority of the ApplicationFile. All the dependencies will have a higher priority (+1).
addGlobalFiles()method 
public function addGlobalFiles(priority:int = 50, context:ApplicationContext = null):void

Add the global ApplicationFile into the loading queue.

Parameters
priority:int (default = 50) — The priority of the global files. In order to have a logical behavior, this priority should be greather than a simple ApplicationFile and its dependencies.
 
context:ApplicationContext (default = null) — The ApplicationContext. If not specified, the global context will be used.
addLoadableFile()method 
protected function addLoadableFile(file:ILoadableFile, priority:int):void

Add the specified ILoadableFile to the queue within the priority. If the ILoadableFile is already into the loading queue, then it checks if the priority must be udpated or not.

Parameters
file:ILoadableFile — The ILoadableFile.
 
priority:int — The priority.