Packageandromeda.process
Classpublic class ActionLoader
InheritanceActionLoader Inheritance CoreActionLoader Inheritance Action Inheritance SimpleAction Inheritance CoreEventDispatcher Inheritance CoreObject

This action process launch the load of a Loader object.

Example :

  import andromeda.events.ActionEvent ;
  import andromeda.process.ActionLoader ;
  
  import flash.display.Loader ;
  import flash.net.URLRequest ;
  
  var url:String = "library/picture.jpg" ;
  
  var loader:Loader = new Loader() ;
  
  loader.x = 50 ;
  loader.y = 50 ;
  
  addChild( loader ) ;
  
  var debug:Function = function( e:Event ):void
  {
      trace(e) ;
  }
  
  function initHandler(event:Event):void
  {
      trace("init currentTarget:" + event.currentTarget + " target:" + event.target ) ;
  }
  
  var process:ActionLoader = new ActionLoader( loader ) ;
  
  process.addEventListener( ActionEvent.START  , debug ) ;
  process.addEventListener( ActionEvent.FINISH , debug ) ;
  
  process.addEventListener(Event.INIT, initHandler);
  
  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.
ActionLoader
  bytesTotal : uint
[read-only] (read-write) Indicates the total number of bytes in the downloaded data.
ActionLoader
 Inheritedchannel : String
Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
  content : DisplayObject
[read-only] (Read-only) Contains the root display object of the SWF file or image (JPG, PNG, or GIF) file that was loaded by using the load() or loadBytes() methods.
ActionLoader
  contentLoaderInfo : LoaderInfo
[read-only] (Read-only) Returns a LoaderInfo object corresponding to the object being loaded.
ActionLoader
  context : LoaderContext
The LoaderContext class provides options for loading SWF files and other media by using the Loader class.
ActionLoader
 Inheriteddelay : uint
Indicates the timeout interval duration.
CoreActionLoader
 InheritedisGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
CoreEventDispatcher
  loader : *
Indicates the loader object of this process.
ActionLoader
 Inheritedlooping : Boolean
The flag to determinate if the Action object is looped.
Action
 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
 InheritedtimeoutPolicy : TimeoutPolicy
Indicates the timeout policy of the loader.
CoreActionLoader
Protected Properties
 PropertyDefined by
 Inherited_request : URLRequest
The internal URLRequest of the loader.
CoreActionLoader
Public Methods
 MethodDefined by
  
ActionLoader(loader:Loader = null, bGlobal:Boolean = false, sChannel:String = null)
Creates a new ActionLoader instance.
ActionLoader
 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.
ActionLoader
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
 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
  
register(dispatcher:IEventDispatcher):void
Register the loader object.
ActionLoader
 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
  
unregister(dispatcher:IEventDispatcher):void
Unregister the loader object.
ActionLoader
 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
  
_init(e:Event):void
Invoked when the Event.INIT event is fired.
ActionLoader
  
_run():void
This protected method contains the invokation of the load method of the current loader of this process.
ActionLoader
 Inherited
complete(e:Event):void
Invoked when the loading is complete.
CoreActionLoader
 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
contentproperty 
content:DisplayObject  [read-only]

(Read-only) Contains the root display object of the SWF file or image (JPG, PNG, or GIF) file that was loaded by using the load() or loadBytes() methods.

Implementation
    public function get content():DisplayObject
contentLoaderInfoproperty 
contentLoaderInfo:LoaderInfo  [read-only]

(Read-only) Returns a LoaderInfo object corresponding to the object being loaded. LoaderInfo objects are shared between the Loader object and the loaded content object. The LoaderInfo object supplies loading progress information and statistics about the loaded file.

Implementation
    public function get contentLoaderInfo():LoaderInfo
contextproperty 
context:LoaderContext  [read-write]

The LoaderContext class provides options for loading SWF files and other media by using the Loader class. The LoaderContext class is used as the context parameter in the load() and loadBytes() methods of the Loader class.

Implementation
    public function get context():LoaderContext
    public function set context(value:LoaderContext):void
loaderproperty 
loader:*  [read-write]

Indicates the loader object of this process.

Implementation
    public function get loader():*
    public function set loader(value:*):void
Constructor detail
ActionLoader()constructor
public function ActionLoader(loader:Loader = null, bGlobal:Boolean = false, sChannel:String = null)

Creates a new ActionLoader instance.

Parameters
loader:Loader (default = null) — The Loader 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
_init()method
protected function _init(e:Event):void

Invoked when the Event.INIT event is fired.

Parameters
e:Event
_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.

register()method 
public override function register(dispatcher:IEventDispatcher):void

Register the loader object.

Parameters
dispatcher:IEventDispatcher
unregister()method 
public override function unregister(dispatcher:IEventDispatcher):void

Unregister the loader object.

Parameters
dispatcher:IEventDispatcher