| Package | com.bourre.load |
| Interface | public interface Loader extends ASyncCommand, Command, Runnable |
| Subinterfaces | ApplicationLoaderListener, DisplayObjectBuilderListener |
| Implementors | AbstractLoader, ApplicationLoader |
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
| Method | Defined by | ||
|---|---|---|---|
![]() |
addASyncCommandListener(listener:ASyncCommandListener, ... rest):Boolean
Adds the passed-in command listener object as listener
for this command events.
| ASyncCommand | |
|
Adds an event listener for the specified event type.
| Loader | ||
|
addListener(listener:Object):Boolean
Adds the passed-in listener as listener for all events dispatched
by this event broadcaster.
| Loader | ||
![]() |
execute(e:Event = null):void
Execute the request according to the current command data.
| Command | |
![]() |
fireCommandEndEvent():void
Fires the
onCommandEnd event to the listeners of this command. | ASyncCommand | |
|
fireOnLoadErrorEvent(message:String = null):void
Dispatches event when an error occur.
| Loader | ||
|
fireOnLoadInitEvent():void
Dispatches event when the loading is finished.
| Loader | ||
|
fireOnLoadProgressEvent():void
Dispatches event during loading progression.
| Loader | ||
|
fireOnLoadStartEvent():void
Dispatches event when the loading starts.
| Loader | ||
|
getName():String
Returns the loader identifier.
| Loader | ||
|
getPerCent():Number
Returns a percentage of bytes loaded and total bytes to load.
| Loader | ||
|
Returns loading strategy used by the loader.
| Loader | ||
|
getURL():URLRequest
Returns the URL used by this loader.
| Loader | ||
![]() |
isRunning():Boolean
Returns
true if this object is running. | Runnable | |
|
load(url:URLRequest = null, context:LoaderContext = null):void
Loads content.
| Loader | ||
|
prefixURL(prefixURL:String):void
Adds prefix to URL passed to the loader instance.
| Loader | ||
![]() |
removeASyncCommandListener(listener:ASyncCommandListener):Boolean
Removes the passed-in command listener object as listener
for this command events.
| ASyncCommand | |
|
Removes the passed-in listener for listening the specified event.
| Loader | ||
|
removeListener(listener:Object):Boolean
Removes the passed-in listener object from this event
broadcaster.
| Loader | ||
![]() |
run():void
Starts the asynchronous process of this runnable object.
| Runnable | |
|
setAntiCache(b:Boolean):void
Sets the 'anticache' system to
true to add timestamp value
to the loaded URL. | Loader | ||
|
setContent(content:Object):void
Uses to replace this loader content.
| Loader | ||
|
setName(name:String):void
Sets the loader identifier.
| Loader | ||
|
setURL(url:URLRequest):void
Defined from which the URL will be loaded.
| Loader | ||
| addEventListener | () | method |
public function addEventListener(type:String, listener:Object, ... rest):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Adds an event listener for the specified event type.
There is two behaviors for the addEventListener
function :
type or at least a
handleEvent function.Delegate object is created and then
added as listener for the event type. There is no restriction on the name of
the function. If the rest is not empty, all elements in it is
used as additional arguments into the delegate object.
type:String — name of the event for which register the listener
|
|
listener:Object — object or function which will receive this event
|
|
... rest — additional arguments for the function listener
|
Boolean — true if the function have been succesfully added as
listener fot the passed-in event
|
| addListener | () | method |
public function addListener(listener:Object):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Adds the passed-in listener as listener for all events dispatched
by this event broadcaster. The function returns true
if the listener have been added at the end of the call. If the
listener is already registered in this event broadcaster the function
returns false.
Note : The addListener function doesn't accept functions
as listener, functions could only register for a single event.
listener:Object — the listener object to add as global listener
|
Boolean — true if the listener have been added during this call
|
| fireOnLoadErrorEvent | () | method |
public function fireOnLoadErrorEvent(message:String = null):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Dispatches event when an error occur.
Parametersmessage:String (default = null) |
| fireOnLoadInitEvent | () | method |
public function fireOnLoadInitEvent():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Dispatches event when the loading is finished.
| fireOnLoadProgressEvent | () | method |
public function fireOnLoadProgressEvent():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Dispatches event during loading progression.
| fireOnLoadStartEvent | () | method |
public function fireOnLoadStartEvent():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Dispatches event when the loading starts.
| getName | () | method |
public function getName():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the loader identifier.
ReturnsString — The loader identifier.
|
| getPerCent | () | method |
public function getPerCent():Number
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns a percentage of bytes loaded and total bytes to load.
ReturnsNumber |
| getStrategy | () | method |
public function getStrategy():LoadStrategy
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns loading strategy used by the loader.
ReturnsLoadStrategy |
| getURL | () | method |
public function getURL():URLRequest
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the URL used by this loader.
If 'anticache' or 'prefix' are used, returns the full qualified url.
ReturnsURLRequest — The URL used by this loader.
|
See also
| load | () | method |
public function load(url:URLRequest = null, context:LoaderContext = null):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Loads content.
Parametersurl:URLRequest (default = null) — The absolute or relative URL of the content to load.
|
|
context:LoaderContext (default = null) — (optional) A LoaderContext object, which has properties that define the following:
|
| prefixURL | () | method |
public function prefixURL(prefixURL:String):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Adds prefix to URL passed to the loader instance.
ParametersprefixURL:String — String ( prefix ) to insert before url value.
|
var loader : Loader = new FileLoader(); loader.prefixURL( "config/context/" ); loader.load( new URLRequest( "info.txt" ) );The loaded url path is :
config/context/info.txt
| removeEventListener | () | method |
public function removeEventListener(type:String, listener:Object):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Removes the passed-in listener for listening the specified event. The listener could be either an object or a function.
Parameterstype:String — name of the event for which unregister the listener
|
|
listener:Object — object or function to be unregistered
|
Boolean — true if the listener have been successfully removed
as listener for the passed-in event
|
| removeListener | () | method |
public function removeListener(listener:Object):Boolean
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Removes the passed-in listener object from this event broadcaster. The object is removed as listener for all events the broadcaster may dispatch.
Parameterslistener:Object — the listener object to remove from
this event broadcaster object
|
Boolean — true if the object have been successfully
removed from this event broadcaster
|
| setAntiCache | () | method |
public function setAntiCache(b:Boolean):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Sets the 'anticache' system to true to add timestamp value
to the loaded URL. In this way, it force the re loading of content and
not use the possible cache content.
b:Boolean — true to set 'anticache' to 'on'
|
| setContent | () | method |
public function setContent(content:Object):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Uses to replace this loader content.
Parameterscontent:Object — New content to set as loader content
|
| setName | () | method |
public function setName(name:String):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Sets the loader identifier.
Identifier is used to register some loader into locator.
Parametersname:String — Loader identifier
|
| setURL | () | method |
public function setURL(url:URLRequest):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Defined from which the URL will be loaded.
Parametersurl:URLRequest — URL to load
|