Packageandromeda.process
Classpublic class ActionURLLoader
InheritanceActionURLLoader Inheritance CoreActionLoader Inheritance Action Inheritance SimpleAction Inheritance CoreEventDispatcher Inheritance CoreObject
SubclassesCoreConfigLoader, CoreLocalizationLoader

This action process launch the load of a URLLoader object.

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() ;
   



Public Properties
 PropertyDefined 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
 Inheritedchannel : 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
 Inheriteddelay : uint
Indicates the timeout interval duration.
CoreActionLoader
  isCollapse : Boolean
Indicated if the console use collapse property or not.
ActionURLLoader
 InheritedisGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inheritedloader : *
Indicates the loader object of this process.
CoreActionLoader
 Inheritedlooping : 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
 Inheritedrequest : URLRequest
Indicates the URLRequest object who captures all of the information in a single HTTP request.
CoreActionLoader
 Inheritedrunning : Boolean
(read-only) Indicates true if the process is in progress.
SimpleAction
  SPACE : String = " "
[static] The space string use to format the debugs.
ActionURLLoader
 InheritedtimeoutPolicy : TimeoutPolicy
Indicates the timeout policy of the loader.
CoreActionLoader
  verbose : Boolean
Indicates the flag of the verbose mode.
ActionURLLoader
Protected Properties
 PropertyDefined by
 Inherited_request : URLRequest
The internal URLRequest of the loader.
CoreActionLoader
Public Methods
 MethodDefined by
  
ActionURLLoader(loader:URLLoader = null, bGlobal:Boolean = false, sChannel:String = null)
Creates a new ActionURLLoader instance.
ActionURLLoader
 Inherited
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
 Inherited
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
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
  
enumerate(o:Object):void
Enumerates the specified object.
ActionURLLoader
 Inherited
Returns the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
Returns the event name use in the notifyChanged method.
Action
 Inherited
Returns the event name use in the notifyCleared method.
Action
 Inherited
Returns the event name use in the notifyInfo method.
Action
 Inherited
Returns the event name use in the notifyLooped method.
Action
 Inherited
Returns the event name use in the notifyProgress method.
Action
 Inherited
Returns the event name use in the notifyResumed method.
Action
 Inherited
Returns the event name use in the notifyStopped method.
Action
 Inherited
Returns the event name use in the notifyTimeOut method.
Action
 Inherited
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
 Inherited
Returns the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
 Inherited
hashCode():uint
Returns a hashcode value for the object.
CoreObject
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
 Inherited
Initialize the internal event's types of this process.
Action
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
 Inherited
Notify an ActionEvent when the process is finished.
CoreActionLoader
 Inherited
Notify an ActionEvent when the process is started.
CoreActionLoader
  
parse():void
Override this method.
ActionURLLoader
 Inherited
register(dispatcher:IEventDispatcher):void
Register the loader object.
CoreActionLoader
 Inherited
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
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
 Inherited
run(... arguments):void
Run the process.
CoreActionLoader
 Inherited
setDelay(time:uint, useSeconds:Boolean = false):void
Set timeout interval duration.
CoreActionLoader
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
 Inherited
setEventTypeCHANGE(type:String):void
Sets the event name use in the notifyChanged method.
Action
 Inherited
setEventTypeCLEAR(type:String):void
Sets the event name use in the notifyCleared method.
Action
 Inherited
setEventTypeINFO(type:String):void
Sets the event name use in the notifyInfo method.
Action
 Inherited
setEventTypeLOOP(type:String):void
Sets the event name use in the notifyLooped method.
Action
 Inherited
setEventTypePROGRESS(type:String):void
Sets the event name use in the notifyProgress method.
Action
 Inherited
setEventTypeRESUME(type:String):void
Sets the event name use in the notifyResumed method.
Action
 Inherited
setEventTypeSTOP(type:String):void
Sets the event name use in the notifyStopped method.
Action
 Inherited
setEventTypeTIMEOUT(type:String):void
Sets the event name use in the notifyTimeOut method.
Action
 Inherited
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
 Inherited
setLogger(log:ILogger = null):void
Sets the internal ILogger reference of this ILogable object.
CoreObject
 Inherited
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
CoreEventDispatcher
 Inherited
toString():String
Returns the string representation of this instance.
CoreObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregister(dispatcher:IEventDispatcher):void
Unregister the loader object.
CoreActionLoader
 Inherited
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
 Inherited
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
Protected Methods
 MethodDefined 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
 Inherited
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
 Inherited
ioError(e:IOErrorEvent):void
Dispatch IOErrorEvent if a call to load() results in a fatal error that terminates the download.
CoreActionLoader
 Inherited
Notify an ActionEvent when the process is changed.
Action
 Inherited
Notify an ActionEvent when the process is cleared.
Action
 Inherited
notifyInfo(info:*):void
Notify an ActionEvent when the process info is changed.
Action
 Inherited
notifyLooped():void
Notify an ActionEvent when the process is looped.
Action
 Inherited
Notify an ActionEvent when the process is in progress.
Action
 Inherited
Notify an ActionEvent when the process is resumed.
Action
 Inherited
Notify an ActionEvent when the process is stopped.
Action
 Inherited
Notify an ActionEvent when the process is out of time.
Action
 Inherited
open(e:Event):void
Dispatch Event.OPEN event when the download operation commences following a call to the load() method.
CoreActionLoader
 Inherited
progress(e:ProgressEvent):void
Invoked when the loading is in complete.
CoreActionLoader
 Inherited
securityError(e:SecurityErrorEvent):void
Dispatch SecurityErrorEvent if a call to load() attempts to load data from a server outside the security sandbox.
CoreActionLoader
 Inherited
setRunning(b:Boolean):void
Changes the running property value.
SimpleAction
Events
 EventSummaryDefined by
 Inherited Dispatched when a process is changed.Action
 Inherited Dispatched when a process is cleared.Action
 Inherited Dispatched when a process is finished.SimpleAction
 Inherited Dispatched when an info process is running.Action
 Inherited Dispatched when a process is looped.Action
 Inherited Dispatched when a process is paused.Action
 Inherited Dispatched when a process is in progress.Action
 Inherited Dispatched when a process is resumed.Action
 Inherited Dispatched when a process is started.SimpleAction
 Inherited Dispatched when a process is stopped.Action
Public Constants
 ConstantDefined by
 InheritedDEFAULT_DELAY : uint = 8000
[static] The default value of the delay before the ActionEvent.TIMEOUT event.
CoreActionLoader
Property detail
bytesLoadedproperty
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
bytesTotalproperty 
bytesTotal:uint  [read-only]

(read-write) Indicates the total number of bytes in the downloaded data.

Implementation
    public function get bytesTotal():uint
dataproperty 
data:*  [read-write]

(read-write) Indicates the data received from the load operation.

Implementation
    public function get data():*
    public function set data(value:*):void
dataFormatproperty 
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
isCollapseproperty 
public var isCollapse:Boolean

Indicated if the console use collapse property or not.

maxDepthproperty 
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_RANGEproperty 
public static var MAX_DEPTH_RANGE:Range

The range of the max depth value.

parsingproperty 
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
SPACEproperty 
public static var SPACE:String = " "

The space string use to format the debugs.

verboseproperty 
public var verbose:Boolean

Indicates the flag of the verbose mode.

Constructor detail
ActionURLLoader()constructor
public function ActionURLLoader(loader:URLLoader = null, bGlobal:Boolean = false, sChannel:String = null)

Creates a new ActionURLLoader instance.

Parameters
loader: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.
Method detail
_run()method
protected override function _run():void

This protected method contains the invokation of the load method of the current loader of this process.

close()method 
public override function close():void

Cancels a load() method operation that is currently in progress for the Loader instance.

complete()method 
protected override function complete(e:Event):void

Dispatch Event.COMPLETE event after all the received data is decoded and placed in the data property.

Parameters
e:Event
enumerate()method 
public function enumerate(o:Object):void

Enumerates the specified object.

Parameters
o:Object
parse()method 
public function parse():void

Override this method. Parse your datas when loading is complete.