| Package | ch.capi.net.files |
| Class | public class URLLoaderFile |
| Inheritance | URLLoaderFile AbstractLoadableFile GlobalEventDispatcher flash.events.EventDispatcher |
| Implements | ILoadableFile |
ILoadableFile based on a URLLoader object.
| 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 | |
![]() | loaded : Boolean [read-only]
Defines if the ILoadManager operation is complete. | AbstractLoadableFile | |
| loaderContext : LoaderContext = null
Defines the LoaderContext for binary files when their are retrieved
as Loader. | URLLoaderFile | ||
![]() | 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 | ||
|---|---|---|---|
URLLoaderFile(loadObject:URLLoader)
Creates a new URLLoaderFile object. | URLLoaderFile | ||
destroy():void
Destroys this URLLoaderFile. | URLLoaderFile | ||
![]() | 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. | URLLoaderFile | ||
getEventDispatcher():IEventDispatcher
Retrieves the IEventDispatcher, which is directly the
URLLoader object. | URLLoaderFile | ||
getType():String
Retrieves the type of the file based on the LoadableFileType constants. | URLLoaderFile | ||
![]() | 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. | URLLoaderFile | ||
![]() | 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 URLLoader. | URLLoaderFile | ||
![]() | registerTo(dispatcher:IEventDispatcher):void
Register the events of the AbstractLoadableFile. | AbstractLoadableFile | |
![]() | unregisterFrom(dispatcher:IEventDispatcher):void
Unregister the events of the AbstractLoadableFile. | AbstractLoadableFile | |
| loaderContext | property |
public var loaderContext:LoaderContext = null
Defines the LoaderContext for binary files when their are retrieved
as Loader.
| URLLoaderFile | () | Constructor |
public function URLLoaderFile(loadObject:URLLoader)
Creates a new URLLoaderFile object.
loadObject:URLLoader — The URLLoader object.
|
| destroy | () | method |
override public function destroy():void
Destroys this URLLoaderFile.
| getData | () | method |
public function getData(asClass:String = null, appDomain:ApplicationDomain = null):*
Retrieves the data of the loadManagerObject if the loading
is complete. Depending of the type of data, many classes are supported :
DataType.BYTE_ARRAY, DataType.BITMAP (for bitmap files only)
and DataType.LOADER are supported. If you use the class DataType.BITMAP, the data won't
be directly available in the Bitmap instance returned. An event Event.INIT will be dispatched
by the Bitmap after the new BitmapData has been updated. If a DataType.LOADER is asked,
each time this method will create a new Loader and the put the data in it using the loadBytes() method.DatyType.URL_VARIABLES is supported.DatyType.XML, DatyType.XML_DOCUMENT,
DatyType.STYLE_SHEET and DatyType.URL_VARIABLES are supported.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.
|
* — 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 IEventDispatcher, which is directly the
URLLoader object.
IEventDispatcher — The URLLoader object.
|
| getType | () | method |
public function getType():String
Retrieves the type of the file based on the LoadableFileType constants.
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 URLLoader.
Parameters
request:URLRequest |