Packagech.capi.net.files
Classpublic class LoaderFile
InheritanceLoaderFile Inheritance AbstractLoadableFile Inheritance GlobalEventDispatcher Inheritance flash.events.EventDispatcher
Implements ILoadableFile

Represents a ILoadableFile based on a Loader object.

See also

IRootDocument


Public Properties
 PropertyDefined By
 InheritedbytesLoaded : uint
[read-only] Defines the bytes that have been loaded.
AbstractLoadableFile
 InheritedbytesTotal : uint
[read-only] Defines the total bytes to load.
AbstractLoadableFile
 InheritedbytesTotalRetrieved : Boolean
[read-only] Defines if the bytesTotal have been retrieved.
AbstractLoadableFile
 InheritedcloseEvent : Event
[read-only] Defines the event that happend to close the file (Event.CLOSE, Event.COMPLETE, ...).
AbstractLoadableFile
 InheriteddispatchGlobalEvents : Boolean
Defines if the global events must be dispatched or not.
GlobalEventDispatcher
 InheritedfixedRequest : URLRequest
[read-only] Defines the URLRequest that has been loaded by the ILoadableFile.
AbstractLoadableFile
  garbageOnDestroy : Boolean = true
Defines if the Garbage Collector will act directly when the file is destroyed (Flash Player 10 only).
LoaderFile
 Inheritedloaded : Boolean
[read-only] Defines if the ILoadManager operation is complete.
AbstractLoadableFile
  loaderContext : LoaderContext = null
Defines the LoaderContext of the Loader object.
LoaderFile
 InheritedloadManagerObject : Object
[read-only] Defines the load manager object.
AbstractLoadableFile
 InheritednetState : String
Defines the NetState value.
AbstractLoadableFile
 Inheritedproperties : IProperties
[read-only] Defines the properties stored in the ILoadableFile.
AbstractLoadableFile
 InheritedstateIdle : Boolean
[read-only] Defines if the AbstractLoadableFile is idle.
AbstractLoadableFile
 InheritedstateLoading : Boolean
[read-only] Defines if the AbstractLoadableFile is loading.
AbstractLoadableFile
 InheritedurlRequest : URLRequest
Defines the URLRequest object that specify the URL to load.
AbstractLoadableFile
 InheritedurlVariables : IMap
Defines the variables key/values to be replaced in the url before the loading is launched.
AbstractLoadableFile
 InheriteduseCache : Boolean
Defines if the ILoadManager can use the cache or not.
AbstractLoadableFile
 InheritedvirtualBytesTotal : uint
Defines the virtual total bytes.
AbstractLoadableFile
Public Methods
 MethodDefined By
  
LoaderFile(loadObject:Loader)
Creates a new LoaderFile object.
LoaderFile
  
destroy():void
Destroys this LoaderFile.
LoaderFile
 Inherited
dispatchEvent(evt:Event):Boolean
Dispatches the specified Event through the listeners.
GlobalEventDispatcher
  
getData(asClass:String = null, appDomain:ApplicationDomain = null):*
Retrieves the data of the loadManagerObject if the loading is complete.
LoaderFile
  
getEventDispatcher():IEventDispatcher
Retrieves the contentLoaderInfo of the Loader.
LoaderFile
  
getType():String
Retrieves the type of the file.
LoaderFile
 Inherited
Invalidate the current fixedRequest.
AbstractLoadableFile
  
isClassSupported(aClass:String, appDomain:ApplicationDomain = null):Boolean
Retrieves if the specified class type is supported by this ILoadableFile or not.
LoaderFile
 Inherited
isDestroyed():Boolean
Retrieves if this ILoadableFile has been destroyed.
AbstractLoadableFile
 Inherited
isOnline():Boolean
Retrieves if the current AbstractLoadableFile is online or not.
AbstractLoadableFile
 Inherited
Tells the ILoadableFile to update the fixedRequest value that will be used to load the file.
AbstractLoadableFile
 Inherited
start():Boolean
Set the state as loading.
AbstractLoadableFile
 Inherited
stop():void
Set the state as idle.
AbstractLoadableFile
 Inherited
toString():String
Get the URL of the AbstractLoadableFile.
AbstractLoadableFile
Protected Methods
 MethodDefined By
 Inherited
checkData():void
Checks if data has been loaded and is available to be retrieved.
AbstractLoadableFile
 Inherited
Checks if the current ILoadableFile has been destroyed and if so, throws an IllegalOperationError.
AbstractLoadableFile
 Inherited
Creates a clone of the current URLRequest and put the variables values in its data.
AbstractLoadableFile
 Inherited
getURLRequest():URLRequest
Retrieves the URLRequest that is created depending of the useCache property value.
AbstractLoadableFile
 Inherited
isInstanceOf(source:String, superClasses:Array, appDomain:ApplicationDomain = null):Boolean
Checks if the specified source class is a child of one of the specified super classes.
AbstractLoadableFile
 Inherited
isInstanceOfClass(source:String, superClass:String, appDomain:ApplicationDomain = null):Boolean
Checks if the specified source class is a child of the specified super class.
AbstractLoadableFile
 Inherited
onComplete(evt:Event):void
Event.COMPLETE listener.
AbstractLoadableFile
 Inherited
onHttpStatus(evt:HTTPStatusEvent):void
HTTPStatusEvent.HTTP_STATUS listener.
AbstractLoadableFile
 Inherited
onInit(evt:Event):void
Event.INIT listener.
AbstractLoadableFile
 Inherited
onIOError(evt:IOErrorEvent):void
IOErrorEvent listener.
AbstractLoadableFile
 Inherited
onOpen(evt:Event):void
Event.OPEN listener.
AbstractLoadableFile
 Inherited
onProgress(evt:ProgressEvent):void
ProgressEvent.PROGRESS listener.
AbstractLoadableFile
 Inherited
onSecurityError(evt:SecurityErrorEvent):void
SecurityErrorEvent listener.
AbstractLoadableFile
  
processLoading(request:URLRequest):void
Starts the loading of the Loader.
LoaderFile
 Inherited
registerTo(dispatcher:IEventDispatcher):void
Register the events of the AbstractLoadableFile.
AbstractLoadableFile
 Inherited
unregisterFrom(dispatcher:IEventDispatcher):void
Unregister the events of the AbstractLoadableFile.
AbstractLoadableFile
Events
 Event Summary Defined By
 InheritedDispatched when the download operation stops.AbstractLoadableFile
 InheritedDispatched after all the received data is received.AbstractLoadableFile
 InheritedDispatched after an event is dispatched.GlobalEventDispatcher
 InheritedDispatched before an event is dispatched.GlobalEventDispatcher
 InheritedDispatched when the http headers are received.AbstractLoadableFile
 InheritedDispatched when the content of the loadManagerObject is displayed.AbstractLoadableFile
 InheritedDispatched if a call to start() results in a fatal error that terminates the download.AbstractLoadableFile
 InheritedDispatched when the download operation commences following a call to the ILoadManager.load() method.AbstractLoadableFile
 InheritedDispatched when data is received as the download operation progresses.AbstractLoadableFile
 InheritedDispatched if a call to start() attempts to load data from a server outside the security sandbox.AbstractLoadableFile
 InheritedDispatched when the load couldn't start.AbstractLoadableFile
Public Constants
 ConstantDefined By
 InheritedNO_CACHE_VARIABLE_NAME : String = noCache
[static] Name of the 'no cache' variable.
AbstractLoadableFile
Property Detail
garbageOnDestroyproperty
public var garbageOnDestroy:Boolean = true

Defines if the Garbage Collector will act directly when the file is destroyed (Flash Player 10 only).

loaderContextproperty 
public var loaderContext:LoaderContext = null

Defines the LoaderContext of the Loader object.

Constructor Detail
LoaderFile()Constructor
public function LoaderFile(loadObject:Loader)

Creates a new LoaderFile object.

Parameters
loadObject:Loader — The URLLoader object.
Method Detail
destroy()method
override public function destroy():void

Destroys this LoaderFile. This will call the unload() method on the Loader. If you're using the FP10, then this method will call the unloadAndStop() method.

See also

getData()method 
public function getData(asClass:String = null, appDomain:ApplicationDomain = null):*

Retrieves the data of the loadManagerObject if the loading is complete. The supported classes are DataType.LOADER, DataType.BITMAP and DataType.BITMAP_DATA. If the asClass parameter is null, then the source Loader object is returned.

Parameters

asClass:String (default = null) — The class instance that should be returned by the method.
 
appDomain:ApplicationDomain (default = null) — The ApplicationDomain to retrieve the class. If null is specified, then the current domain will be used.

Returns
* — An instance of the specified class containing the data of the loadManagerObject.

Throws
ArgumentError If — the class type is not supported.
 
ch.capi.errors:DataError If — the data are not loaded.

See also

getEventDispatcher()method 
public function getEventDispatcher():IEventDispatcher

Retrieves the contentLoaderInfo of the Loader.

Returns
IEventDispatcher — The LoaderInfo object.
getType()method 
public function getType():String

Retrieves the type of the file. This method always return LoadableFileType.SWF.

Returns
String — The ILoadableFile type.
isClassSupported()method 
public function isClassSupported(aClass:String, appDomain:ApplicationDomain = null):Boolean

Retrieves if the specified class type is supported by this ILoadableFile or not.

Parameters

aClass:String — The class type to check.
 
appDomain:ApplicationDomain (default = null) — The ApplicationDomain to retrieve the class. If null is specified, then the current domain will be used.

Returns
Booleantrue if the type is supported.
processLoading()method 
override protected function processLoading(request:URLRequest):void

Starts the loading of the Loader.

Parameters

request:URLRequest