| Package | andromeda.process |
| Class | public class ActionLoader |
| Inheritance | ActionLoader CoreActionLoader Action SimpleAction CoreEventDispatcher CoreObject |
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() ;
| Property | Defined 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 | ||
![]() | channel : 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 | ||
![]() | delay : uint
Indicates the timeout interval duration.
| CoreActionLoader | |
![]() | isGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
| loader : *
Indicates the loader object of this process.
| ActionLoader | ||
![]() | looping : Boolean
The flag to determinate if the Action object is looped.
| Action | |
![]() | 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 | |
![]() | timeoutPolicy : TimeoutPolicy
Indicates the timeout policy of the loader.
| CoreActionLoader | |
| Method | Defined by | ||
|---|---|---|---|
|
ActionLoader(loader:Loader = null, bGlobal:Boolean = false, sChannel:String = null)
Creates a new ActionLoader instance.
| ActionLoader | ||
![]() |
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.
| ActionLoader | ||
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| CoreEventDispatcher | |
![]() |
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 | |
|
register(dispatcher:IEventDispatcher):void
Register the loader object.
| ActionLoader | ||
![]() |
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.
| ActionLoader | ||
![]() |
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 | ||
|---|---|---|---|
|
_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 | ||
![]() |
complete(e:Event):void
Invoked when the loading is complete.
| CoreActionLoader | |
![]() |
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
| content | property |
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
| contentLoaderInfo | property |
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
| context | property |
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
| loader | property |
loader:* [read-write]Indicates the loader object of this process.
Implementation public function get loader():*
public function set loader(value:*):void
| ActionLoader | () | constructor |
public function ActionLoader(loader:Loader = null, bGlobal:Boolean = false, sChannel:String = null)Creates a new ActionLoader instance.
Parametersloader: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.
|
| _init | () | method |
protected function _init(e:Event):voidInvoked when the Event.INIT event is fired.
Parameterse:Event |
| _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.
| register | () | method |
public override function register(dispatcher:IEventDispatcher):voidRegister the loader object.
Parametersdispatcher:IEventDispatcher |
| unregister | () | method |
public override function unregister(dispatcher:IEventDispatcher):voidUnregister the loader object.
Parametersdispatcher:IEventDispatcher |