Package | ch.capi.net |
Class | public class AbstractLoadableFile |
Inheritance | AbstractLoadableFile flash.events.EventDispatcher |
Implements | INetStateManager |
AbstractLoadableFile
. This is a basic
implementation to store the generic data of a ILoadableFile
.
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 | ||
loadManagerObject : Object [read-only]
Defines the load manager object.
| AbstractLoadableFile | ||
netState : String
Defines the
NetState value. | AbstractLoadableFile | ||
properties : IMap
[read-only]
Defines the properties stored into 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 | ||
useCache : Boolean
Defines if the
ILoadManager can use the cache or not. | AbstractLoadableFile | ||
virtualBytesTotal : uint
Defines the virtual total bytes.
| AbstractLoadableFile |
Method | Defined by | ||
---|---|---|---|
AbstractLoadableFile(loadManagerObject:Object)
Creates a new
AbstractLoadableFile object. | AbstractLoadableFile | ||
getURLRequest():URLRequest
Retrieves the
URLRequest that is created depending of
the useCache property value. | AbstractLoadableFile | ||
isOnline():Boolean
Retrieves if the current
AbstractLoadableFile is online or not. | AbstractLoadableFile | ||
start():void
Stet 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 | ||
---|---|---|---|
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 | ||
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 | ||
registerTo(dispatcher:IEventDispatcher):void
Register the events of the
AbstractLoadableFile . | AbstractLoadableFile | ||
unregisterFrom(dispatcher:IEventDispatcher):void
Unregister the events of the
AbstractLoadableFile . | AbstractLoadableFile |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when the download operation stops. | AbstractLoadableFile | |||
Dispatched after all the received data is received. | AbstractLoadableFile | |||
Dispatched if a call to start() results in a fatal error that terminates the download. | AbstractLoadableFile | |||
Dispatched when the download operation commences following a call to the ILoadManager.load()
method. | AbstractLoadableFile | |||
Dispatched when data is received as the download operation progresses. | AbstractLoadableFile | |||
Dispatched if a call to start() attempts to load data from a server outside the security sandbox. | AbstractLoadableFile |
Constant | Defined by | ||
---|---|---|---|
NO_CACHE_VARIABLE_NAME : String = "noCache" [static]
Name of the 'no cache' variable.
| AbstractLoadableFile |
bytesLoaded | property |
bytesLoaded:uint
[read-only]Defines the bytes that have been loaded.
Implementation public function get bytesLoaded():uint
bytesTotal | property |
bytesTotal:uint
[read-only]Defines the total bytes to load.
Implementation public function get bytesTotal():uint
bytesTotalRetrieved | property |
bytesTotalRetrieved:Boolean
[read-only]
Defines if the bytesTotal
have been retrieved.
public function get bytesTotalRetrieved():Boolean
closeEvent | property |
closeEvent:Event
[read-only]Defines the event that happend to close the file (Event.CLOSE, Event.COMPLETE, ...).
Implementation public function get closeEvent():Event
loadManagerObject | property |
loadManagerObject:Object
[read-only]Defines the load manager object.
Implementation public function get loadManagerObject():Object
netState | property |
netState:String
[read-write]
Defines the NetState
value. The value available can
be retrieved from the NetState
class.
public function get netState():String
public function set netState(value:String):void
See also
properties | property |
properties:IMap
[read-only]
Defines the properties stored into the
ILoadableFile
.
public function get properties():IMap
stateIdle | property |
stateIdle:Boolean
[read-only]
Defines if the AbstractLoadableFile
is idle.
public function get stateIdle():Boolean
stateLoading | property |
stateLoading:Boolean
[read-only]
Defines if the AbstractLoadableFile
is loading.
public function get stateLoading():Boolean
urlRequest | property |
urlRequest:URLRequest
[read-write]
Defines the URLRequest
object that specify the
URL to load.
public function get urlRequest():URLRequest
public function set urlRequest(value:URLRequest):void
useCache | property |
useCache:Boolean
[read-write]
Defines if the ILoadManager
can use the cache or not.
public function get useCache():Boolean
public function set useCache(value:Boolean):void
virtualBytesTotal | property |
virtualBytesTotal:uint
[read-write]Defines the virtual total bytes. This value represents an approximation of the total bytes. This value should be greather than the real amount of bytes of the loadable file.
Implementation public function get virtualBytesTotal():uint
public function set virtualBytesTotal(value:uint):void
AbstractLoadableFile | () | constructor |
public function AbstractLoadableFile(loadManagerObject:Object)
Creates a new AbstractLoadableFile
object.
loadManagerObject:Object — The loadManagerObject .
|
getURLRequest | () | method |
public function getURLRequest():URLRequest
Retrieves the URLRequest
that is created depending of
the useCache
property value. The creation of the URLRequest
is based on the netState
. If the isOnline()
method returns
false
or the useCache
property value is true, then
the current urlRequest
is returned. Else a new URLRequest
is created,
cloning the data and adding a no cache variable.
URLRequest — The URLRequest
|
See also
isInstanceOf | () | method |
protected function 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.
Parameterssource:String — The source class.
|
|
superClasses:Array — An Array of String describing a list of classes.
|
|
appDomain:ApplicationDomain (default = null ) — The ApplicationDomain to retrieve the classes.
|
Boolean — true if the source class extends one of the super classes.
|
isInstanceOfClass | () | method |
protected function isInstanceOfClass(source:String, superClass:String, appDomain:ApplicationDomain = null):Boolean
Checks if the specified source class is a child of the specified super class.
Parameterssource:String — The source class (child).
|
|
superClass:String — The super class.
|
|
appDomain:ApplicationDomain (default = null ) — The ApplicationDomain to retrieve the classe.
|
Boolean — true if the source class extends the super class.
|
See also
isOnline | () | method |
public function isOnline():Boolean
Retrieves if the current AbstractLoadableFile
is online or not. If the current netState
value is NetState.DYNAMIC
, then the online state is retrieved from the specified url. If the url
is relative (no protocol specified), then the online state is retrieved from the current security sandbox.
Boolean — true if the AbstractLoadableFile is online.
|
See also
onComplete | () | method |
protected function onComplete(evt:Event):void
Event.COMPLETE
listener.
evt:Event — The event object.
|
onIOError | () | method |
protected function onIOError(evt:IOErrorEvent):void
IOErrorEvent
listener.
evt:IOErrorEvent — The event object.
|
onOpen | () | method |
protected function onOpen(evt:Event):void
Event.OPEN
listener.
evt:Event — The event object.
|
onProgress | () | method |
protected function onProgress(evt:ProgressEvent):void
ProgressEvent.PROGRESS
listener.
evt:ProgressEvent — The event object.
|
onSecurityError | () | method |
protected function onSecurityError(evt:SecurityErrorEvent):void
SecurityErrorEvent
listener.
evt:SecurityErrorEvent — The event object.
|
registerTo | () | method |
protected function registerTo(dispatcher:IEventDispatcher):void
Register the events of the AbstractLoadableFile
.
dispatcher:IEventDispatcher — The IEventDispatcher of the events.
|
See also
start | () | method |
public function start():void
Stet the state as loading.
— If the AbstractLoadableFile is already loading.
|
stop | () | method |
public function stop():void
Set the state as idle.
— If the ILoadManager is not loading.
|
toString | () | method |
public override function toString():String
Get the URL of the AbstractLoadableFile
.
String — The url or null if the urlRequest is not defined.
|
unregisterFrom | () | method |
protected function unregisterFrom(dispatcher:IEventDispatcher):void
Unregister the events of the AbstractLoadableFile
.
dispatcher:IEventDispatcher — The IEventDispatcher of the events.
|
See also
close | event |
flash.events.Event
Dispatched when the download operation stops. This is following a call to the ILoadManager.stop()
method.
complete | event |
ioError | event |
flash.events.IOErrorEvent
Dispatched if a call to start()
results in a fatal error that terminates the download.
open | event |
flash.events.Event
Dispatched when the download operation commences following a call to the ILoadManager.load()
method.
progress | event |
flash.events.ProgressEvent
Dispatched when data is received as the download operation progresses.
securityError | event |
flash.events.SecurityErrorEvent
Dispatched if a call to start()
attempts to load data from a server outside the security sandbox.
NO_CACHE_VARIABLE_NAME | constant |
public static const NO_CACHE_VARIABLE_NAME:String = "noCache"
Name of the 'no cache' variable.