| Package | ch.capi.net.files |
| Class | public class LoaderFile |
| Inheritance | LoaderFile AbstractLoadableFile GlobalEventDispatcher flash.events.EventDispatcher |
| Implements | ILoadableFile |
ILoadableFile based on a Loader object.
See also
| Property | Defined By | ||
|---|---|---|---|
![]() | bytesLoaded : uint [read-only]
Defines the bytes that have been loaded. | AbstractLoadableFile | |
![]() | bytesTotal : uint [read-only]
Defines the total bytes to load. | AbstractLoadableFile | |
![]() | bytesTotalRetrieved : Boolean [read-only]
Defines if the bytesTotal have been retrieved. | AbstractLoadableFile | |
![]() | closeEvent : Event [read-only]
Defines the event that happend to close the file (Event.CLOSE, Event.COMPLETE, ...). | AbstractLoadableFile | |
![]() | dispatchGlobalEvents : Boolean
Defines if the global events must be dispatched or not. | GlobalEventDispatcher | |
![]() | fixedRequest : 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 | ||
![]() | loaded : Boolean [read-only]
Defines if the ILoadManager operation is complete. | AbstractLoadableFile | |
| loaderContext : LoaderContext = null
Defines the LoaderContext of the
Loader object. | LoaderFile | ||
![]() | loadManagerObject : Object [read-only]
Defines the load manager object. | AbstractLoadableFile | |
![]() | netState : String
Defines the NetState value. | AbstractLoadableFile | |
![]() | properties : IProperties [read-only]
Defines the properties stored in the
ILoadableFile. | AbstractLoadableFile | |
![]() | stateIdle : Boolean [read-only]
Defines if the AbstractLoadableFile is idle. | AbstractLoadableFile | |
![]() | stateLoading : Boolean [read-only]
Defines if the AbstractLoadableFile is loading. | AbstractLoadableFile | |
![]() | urlRequest : URLRequest
Defines the URLRequest object that specify the
URL to load. | AbstractLoadableFile | |
![]() | urlVariables : IMap
Defines the variables key/values to be replaced
in the url before the loading is launched. | AbstractLoadableFile | |
![]() | useCache : Boolean
Defines if the ILoadManager can use the cache or not. | AbstractLoadableFile | |
![]() | virtualBytesTotal : uint
Defines the virtual total bytes. | AbstractLoadableFile | |
| Method | Defined By | ||
|---|---|---|---|
LoaderFile(loadObject:Loader)
Creates a new LoaderFile object. | LoaderFile | ||
destroy():void
Destroys this LoaderFile. | LoaderFile | ||
![]() | 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 | ||
![]() | invalidateFixedRequest():void
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 | ||
![]() | isDestroyed():Boolean
Retrieves if this ILoadableFile has been destroyed. | AbstractLoadableFile | |
![]() | isOnline():Boolean
Retrieves if the current AbstractLoadableFile is online or not. | AbstractLoadableFile | |
![]() | prepareFixedRequest():void
Tells the ILoadableFile to update the fixedRequest value that
will be used to load the file. | AbstractLoadableFile | |
![]() | start():Boolean
Set the state as loading. | AbstractLoadableFile | |
![]() | stop():void
Set the state as idle. | AbstractLoadableFile | |
![]() | toString():String
Get the URL of the AbstractLoadableFile. | AbstractLoadableFile | |
| Method | Defined By | ||
|---|---|---|---|
![]() | checkData():void
Checks if data has been loaded and is available to be retrieved. | AbstractLoadableFile | |
![]() | checkDestroyed():void
Checks if the current ILoadableFile has been destroyed and if so, throws an IllegalOperationError. | AbstractLoadableFile | |
![]() | getUpdatedUrlRequest():URLRequest
Creates a clone of the current URLRequest and put the variables values in its data. | AbstractLoadableFile | |
![]() | getURLRequest():URLRequest
Retrieves the URLRequest that is created depending of
the useCache property value. | AbstractLoadableFile | |
![]() | 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 | |
![]() | isInstanceOfClass(source:String, superClass:String, appDomain:ApplicationDomain = null):Boolean
Checks if the specified source class is a child of the specified super class. | AbstractLoadableFile | |
![]() | onComplete(evt:Event):void
Event.COMPLETE listener. | AbstractLoadableFile | |
![]() | onHttpStatus(evt:HTTPStatusEvent):void
HTTPStatusEvent.HTTP_STATUS listener. | AbstractLoadableFile | |
![]() | onInit(evt:Event):void
Event.INIT listener. | AbstractLoadableFile | |
![]() | onIOError(evt:IOErrorEvent):void
IOErrorEvent listener. | AbstractLoadableFile | |
![]() | onOpen(evt:Event):void
Event.OPEN listener. | AbstractLoadableFile | |
![]() | onProgress(evt:ProgressEvent):void
ProgressEvent.PROGRESS listener. | AbstractLoadableFile | |
![]() | onSecurityError(evt:SecurityErrorEvent):void
SecurityErrorEvent listener. | AbstractLoadableFile | |
processLoading(request:URLRequest):void
Starts the loading of the Loader. | LoaderFile | ||
![]() | registerTo(dispatcher:IEventDispatcher):void
Register the events of the AbstractLoadableFile. | AbstractLoadableFile | |
![]() | unregisterFrom(dispatcher:IEventDispatcher):void
Unregister the events of the AbstractLoadableFile. | AbstractLoadableFile | |
| garbageOnDestroy | property |
public var garbageOnDestroy:Boolean = trueDefines if the Garbage Collector will act directly when the file is destroyed (Flash Player 10 only).
| loaderContext | property |
public var loaderContext:LoaderContext = null
Defines the LoaderContext of the
Loader object.
| LoaderFile | () | Constructor |
public function LoaderFile(loadObject:Loader)
Creates a new LoaderFile object.
loadObject:Loader — The URLLoader object.
|
| 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.
|
* — An instance of the specified class containing the data of the loadManagerObject.
|
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.
IEventDispatcher — The LoaderInfo object.
|
| getType | () | method |
public function getType():String
Retrieves the type of the file. This method always return LoadableFileType.SWF.
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.
|
Boolean — true if the type is supported.
|
| processLoading | () | method |
override protected function processLoading(request:URLRequest):void
Starts the loading of the Loader.
Parameters
request:URLRequest |