| Package | andromeda.process |
| Class | public class ActionURLLoader |
| Inheritance | ActionURLLoader CoreActionLoader Action SimpleAction CoreEventDispatcher CoreObject |
| Subclasses | CoreConfigLoader, CoreLocalizationLoader |
Example :
import andromeda.events.ActionEvent ;
import andromeda.process.ActionURLLoader ;
import system.eden ;
import flash.net.URLLoader ;
import flash.net.URLRequest ;
var url:String = "data/config.eden" ;
var loader:URLLoader = new URLLoader() ;
var start:Function = function( e:Event ):void
{
trace(e) ;
}
var finish:Function = function( e:Event ):void
{
trace(e) ;
var target:ActionURLLoader = e.target as ActionURLLoader ;
var data: = eden.deserialize( target.data ) ;
for (var prop:String in data)
{
trace(" > " + prop + " : " + data[prop]) ;
}
}
var process:ActionURLLoader = new ActionURLLoader( loader ) ;
process.addEventListener( ActionEvent.START , start ) ;
process.addEventListener( ActionEvent.FINISH , finish ) ;
process.request = new URLRequest( url ) ;
process.run() ;
| Property | Defined by | ||
|---|---|---|---|
| bytesLoaded : uint [read-only]
(read-only) Indicates the number of bytes that have been loaded thus far during the load operation.
| ActionURLLoader | ||
| bytesTotal : uint [read-only]
(read-write) Indicates the total number of bytes in the downloaded data.
| ActionURLLoader | ||
![]() | channel : String
Indicates the channel of this dispatcher if this instance is global.
| CoreEventDispatcher | |
| data : *
(read-write) Indicates the data received from the load operation.
| ActionURLLoader | ||
| dataFormat : String
(read-write) Controls whether the downloaded data is received as
- text (URLLoaderDataFormat.TEXT),
- raw binary data (URLLoaderDataFormat.BINARY)
- URL-encoded variables (URLLoaderDataFormat.VARIABLES).
| ActionURLLoader | ||
![]() | delay : uint
Indicates the timeout interval duration.
| CoreActionLoader | |
| isCollapse : Boolean
Indicated if the console use collapse property or not.
| ActionURLLoader | ||
![]() | isGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
![]() | loader : *
Indicates the loader object of this process.
| CoreActionLoader | |
![]() | looping : Boolean
The flag to determinate if the Action object is looped.
| Action | |
| maxDepth : uint
(read-only) Returns the max depth to collaspe the structure of an object in the console.
| ActionURLLoader | ||
| MAX_DEPTH_RANGE : Range
[static]
The range of the max depth value.
| ActionURLLoader | ||
| parsing : Boolean
(read-write) Activate or disactivate parsing (Use this with XML, EDEN, JSON...).
| ActionURLLoader | ||
![]() | request : URLRequest
Indicates the URLRequest object who captures all of the information in a single HTTP request.
| CoreActionLoader | |
![]() | running : Boolean
(read-only) Indicates
true if the process is in progress. | SimpleAction | |
| SPACE : String = " " [static]
The space string use to format the debugs.
| ActionURLLoader | ||
![]() | timeoutPolicy : TimeoutPolicy
Indicates the timeout policy of the loader.
| CoreActionLoader | |
| verbose : Boolean
Indicates the flag of the verbose mode.
| ActionURLLoader | ||
| Method | Defined by | ||
|---|---|---|---|
|
ActionURLLoader(loader:URLLoader = null, bGlobal:Boolean = false, sChannel:String = null)
Creates a new ActionURLLoader instance.
| ActionURLLoader | ||
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
| CoreEventDispatcher | |
![]() |
clone():*
Returns a shallow copy of this object.
| Action | |
|
close():void
Cancels a load() method operation that is currently in progress for the Loader instance.
| ActionURLLoader | ||
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| CoreEventDispatcher | |
|
enumerate(o:Object):void
Enumerates the specified object.
| ActionURLLoader | ||
![]() |
Returns the internal
EventDispatcher reference. | CoreEventDispatcher | |
![]() |
getEventTypeCHANGE():String
Returns the event name use in the notifyChanged method.
| Action | |
![]() |
getEventTypeCLEAR():String
Returns the event name use in the notifyCleared method.
| Action | |
![]() |
getEventTypeINFO():String
Returns the event name use in the notifyInfo method.
| Action | |
![]() |
getEventTypeLOOP():String
Returns the event name use in the notifyLooped method.
| Action | |
![]() |
getEventTypePROGRESS():String
Returns the event name use in the notifyProgress method.
| Action | |
![]() |
getEventTypeRESUME():String
Returns the event name use in the notifyResumed method.
| Action | |
![]() |
getEventTypeSTOP():String
Returns the event name use in the notifyStopped method.
| Action | |
![]() |
getEventTypeTIMEOUT():String
Returns the event name use in the notifyTimeOut method.
| Action | |
![]() |
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| CoreEventDispatcher | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
![]() |
Creates and returns the internal
EventDispatcher reference (this method is invoked in the constructor). | CoreEventDispatcher | |
![]() |
initEventType():void
Initialize the internal event's types of this process.
| Action | |
![]() |
isLocked():Boolean
Returns
true if the object is locked. | CoreEventDispatcher | |
![]() |
lock():void
Locks the object.
| CoreEventDispatcher | |
![]() |
notifyFinished():void
Notify an ActionEvent when the process is finished.
| CoreActionLoader | |
![]() |
notifyStarted():void
Notify an ActionEvent when the process is started.
| CoreActionLoader | |
|
parse():void
Override this method.
| ActionURLLoader | ||
![]() |
register(dispatcher:IEventDispatcher):void
Register the loader object.
| CoreActionLoader | |
![]() |
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
| CoreEventDispatcher | |
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| CoreEventDispatcher | |
![]() |
run(... arguments):void
Run the process.
| CoreActionLoader | |
![]() |
setDelay(time:uint, useSeconds:Boolean = false):void
Set timeout interval duration.
| CoreActionLoader | |
![]() |
setEventDispatcher(e:EventDispatcher):void
Sets the internal
EventDispatcher reference. | CoreEventDispatcher | |
![]() |
setEventTypeCHANGE(type:String):void
Sets the event name use in the notifyChanged method.
| Action | |
![]() |
setEventTypeCLEAR(type:String):void
Sets the event name use in the notifyCleared method.
| Action | |
![]() |
setEventTypeINFO(type:String):void
Sets the event name use in the notifyInfo method.
| Action | |
![]() |
setEventTypeLOOP(type:String):void
Sets the event name use in the notifyLooped method.
| Action | |
![]() |
setEventTypePROGRESS(type:String):void
Sets the event name use in the notifyProgress method.
| Action | |
![]() |
setEventTypeRESUME(type:String):void
Sets the event name use in the notifyResumed method.
| Action | |
![]() |
setEventTypeSTOP(type:String):void
Sets the event name use in the notifyStopped method.
| Action | |
![]() |
setEventTypeTIMEOUT(type:String):void
Sets the event name use in the notifyTimeOut method.
| Action | |
![]() |
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global
EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher. | CoreEventDispatcher | |
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreEventDispatcher | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
![]() |
unlock():void
Unlocks the display.
| CoreEventDispatcher | |
![]() |
unregister(dispatcher:IEventDispatcher):void
Unregister the loader object.
| CoreActionLoader | |
![]() |
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
| CoreEventDispatcher | |
![]() |
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| CoreEventDispatcher | |
| Method | Defined by | ||
|---|---|---|---|
|
_run():void
This protected method contains the invokation of the load method of the current loader of this process.
| ActionURLLoader | ||
|
complete(e:Event):void
Dispatch Event.COMPLETE event after all the received data is decoded and placed in the data property.
| ActionURLLoader | ||
![]() |
httpStatus(e:HTTPStatusEvent):void
Dispatch HTTPStatusEvent if a call to load() attempts to access data over HTTP and the current Flash Player environment is able to detect and return the status code for the request.
| CoreActionLoader | |
![]() |
ioError(e:IOErrorEvent):void
Dispatch IOErrorEvent if a call to load() results in a fatal error that terminates the download.
| CoreActionLoader | |
![]() |
notifyChanged():void
Notify an ActionEvent when the process is changed.
| Action | |
![]() |
notifyCleared():void
Notify an ActionEvent when the process is cleared.
| Action | |
![]() |
notifyInfo(info:*):void
Notify an ActionEvent when the process info is changed.
| Action | |
![]() |
notifyLooped():void
Notify an ActionEvent when the process is looped.
| Action | |
![]() |
notifyProgress():void
Notify an ActionEvent when the process is in progress.
| Action | |
![]() |
notifyResumed():void
Notify an ActionEvent when the process is resumed.
| Action | |
![]() |
notifyStopped():void
Notify an ActionEvent when the process is stopped.
| Action | |
![]() |
notifyTimeOut():void
Notify an ActionEvent when the process is out of time.
| Action | |
![]() |
open(e:Event):void
Dispatch Event.OPEN event when the download operation commences following a call to the load() method.
| CoreActionLoader | |
![]() |
progress(e:ProgressEvent):void
Invoked when the loading is in complete.
| CoreActionLoader | |
![]() |
securityError(e:SecurityErrorEvent):void
Dispatch SecurityErrorEvent if a call to load() attempts to load data from a server outside the security sandbox.
| CoreActionLoader | |
![]() |
setRunning(b:Boolean):void
Changes the running property value.
| SimpleAction | |
| bytesLoaded | property |
bytesLoaded:uint [read-only](read-only) Indicates the number of bytes that have been loaded thus far during the load operation.
Implementation public function get bytesLoaded():uint
| bytesTotal | property |
bytesTotal:uint [read-only](read-write) Indicates the total number of bytes in the downloaded data.
Implementation public function get bytesTotal():uint
| data | property |
data:* [read-write](read-write) Indicates the data received from the load operation.
Implementation public function get data():*
public function set data(value:*):void
| dataFormat | property |
dataFormat:String [read-write](read-write) Controls whether the downloaded data is received as - text (URLLoaderDataFormat.TEXT), - raw binary data (URLLoaderDataFormat.BINARY) - URL-encoded variables (URLLoaderDataFormat.VARIABLES).
Implementation public function get dataFormat():String
public function set dataFormat(value:String):void
| isCollapse | property |
public var isCollapse:BooleanIndicated if the console use collapse property or not.
| maxDepth | property |
maxDepth:uint [read-write](read-only) Returns the max depth to collaspe the structure of an object in the console.
Implementation public function get maxDepth():uint
public function set maxDepth(value:uint):void
| MAX_DEPTH_RANGE | property |
public static var MAX_DEPTH_RANGE:RangeThe range of the max depth value.
| parsing | property |
parsing:Boolean [read-write](read-write) Activate or disactivate parsing (Use this with XML, EDEN, JSON...).
Implementation public function get parsing():Boolean
public function set parsing(value:Boolean):void
| SPACE | property |
public static var SPACE:String = " "The space string use to format the debugs.
| verbose | property |
public var verbose:BooleanIndicates the flag of the verbose mode.
| ActionURLLoader | () | constructor |
public function ActionURLLoader(loader:URLLoader = null, bGlobal:Boolean = false, sChannel:String = null)Creates a new ActionURLLoader instance.
Parametersloader:URLLoader (default = null) — The URLLoader object to load.
|
|
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
|
|
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
|
| _run | () | method |
protected override function _run():voidThis protected method contains the invokation of the load method of the current loader of this process.
| close | () | method |
public override function close():voidCancels a load() method operation that is currently in progress for the Loader instance.
| complete | () | method |
protected override function complete(e:Event):voidDispatch Event.COMPLETE event after all the received data is decoded and placed in the data property.
Parameterse:Event |
| enumerate | () | method |
public function enumerate(o:Object):voidEnumerates the specified object.
Parameterso:Object |
| parse | () | method |
public function parse():voidOverride this method. Parse your datas when loading is complete.