ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
fl.events 

RSLErrorEvent  - AS3 Flash

Packagefl.events
Classpublic class RSLErrorEvent
InheritanceRSLErrorEvent Inheritance ErrorEvent Inheritance TextEvent Inheritance Event Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flash CS5
Runtime Versions: Flash Player 10.1, AIR 2

The RSLErrorEvent class defines an error event dispatched by RSLPreloader. This event indicates that the download of RSLs has failed, and provides information on the files that have failed and the number of files, both attempted and failed. When a custom event preloading loop is used, and the RSLPreloader code is generated automatically by Flash authoring, this event is dispatched by the main timeline. In this case, use addEventListener without needing to reference the RSLPreloader.

Related API Elements



Public Properties
 PropertyDefined By
 Inheritedbubbles : Boolean
[read-only] Indicates whether an event is a bubbling event.
Event
 Inheritedcancelable : Boolean
[read-only] Indicates whether the behavior associated with the event can be prevented.
Event
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 InheritedcurrentTarget : Object
[read-only] The object that is actively processing the Event object with an event listener.
Event
 InheritederrorID : int
[read-only] Contains the reference number associated with the specific error.
ErrorEvent
 InheritedeventPhase : uint
[read-only] The current phase in the event flow.
Event
  failedURLs : Array
[read-only] Returns an array of files that have failed to download.
RSLErrorEvent
  rslsFailed : int
[read-only] Returns the number of files that have failed to download.
RSLErrorEvent
  rslsLoaded : int
[read-only] Returns the number of files that have downloaded successfully.
RSLErrorEvent
  rslsTotal : int
[read-only] Returns the total number of files that have downloaded, successfully or not.
RSLErrorEvent
 Inheritedtarget : Object
[read-only] The event target.
Event
 Inheritedtext : String
For a textInput event, the character or sequence of characters entered by the user.
TextEvent
 Inheritedtype : String
[read-only] The type of event.
Event
Public Methods
 MethodDefined By
  
RSLErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, rslsLoaded:int = 0, rslsFailed:int = 0, rslsTotal:int = 0, failedURLs:Array = null)
Creates an RSLErrorEvent object that contains information about RSLError events.
RSLErrorEvent
 Inherited
[override] Creates a copy of the ErrorEvent object and sets the value of each property to match that of the original.
ErrorEvent
 Inherited
formatToString(className:String, ... arguments):String
A utility function for implementing the toString() method in custom ActionScript 3.0 Event classes.
Event
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Checks whether the preventDefault() method has been called on the event.
Event
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Cancels an event's default behavior if that behavior can be canceled.
Event
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow.
Event
 Inherited
Prevents processing of any event listeners in nodes subsequent to the current node in the event flow.
Event
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
[override] Returns a string that contains all the properties of the ErrorEvent object.
ErrorEvent
 Inherited
Returns the primitive value of the specified object.
Object
Public Constants
 ConstantDefined By
  RSL_LOAD_FAILED : String = "rslLoadFailed"
[static] Error dispatched by RSLPreloader when all RSLs have finished downloading and one or more have failed.
RSLErrorEvent
Property Detail

failedURLs

property
failedURLs:Array  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS5
Runtime Versions: Flash Player 10.1, AIR 2

Returns an array of files that have failed to download.



Implementation
    public function get failedURLs():Array

rslsFailed

property 
rslsFailed:int  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS5
Runtime Versions: Flash Player 10.1, AIR 2

Returns the number of files that have failed to download.



Implementation
    public function get rslsFailed():int

rslsLoaded

property 
rslsLoaded:int  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS5
Runtime Versions: Flash Player 10.1, AIR 2

Returns the number of files that have downloaded successfully.



Implementation
    public function get rslsLoaded():int

rslsTotal

property 
rslsTotal:int  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS5
Runtime Versions: Flash Player 10.1, AIR 2

Returns the total number of files that have downloaded, successfully or not.



Implementation
    public function get rslsTotal():int
Constructor Detail

RSLErrorEvent

()Constructor
public function RSLErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, rslsLoaded:int = 0, rslsFailed:int = 0, rslsTotal:int = 0, failedURLs:Array = null)

Language Version: ActionScript 3.0
Product Version: Flash CS5
Runtime Versions: Flash Player 10.1, AIR 2

Creates an RSLErrorEvent object that contains information about RSLError events. RSLErrorEvent objects are passed as parameters to event listeners.

Parameters
type:String — The type of the event. Possible values are: RSLEvent.RSL_LOAD_COMPLETE and RSLEvent.RSL_PROGRESS.
 
bubbles:Boolean (default = false) — Determines whether the Event object participates in the bubbling stage of the event flow.
 
cancelable:Boolean (default = false) — Determines whether the Event object can be canceled.
 
rslsLoaded:int (default = 0) — The number of files that have downloaded successfully.
 
rslsFailed:int (default = 0) — The number of files that have failed to download.
 
rslsTotal:int (default = 0) — The total number of files that have downloaded, successfully or not.
 
failedURLs:Array (default = null) — An array of files that have failed to download.
Constant Detail

RSL_LOAD_FAILED

Constant
public static const RSL_LOAD_FAILED:String = "rslLoadFailed"

Language Version: ActionScript 3.0
Product Version: Flash CS5
Runtime Versions: Flash Player 10.1, AIR 2

Error dispatched by RSLPreloader when all RSLs have finished downloading and one or more have failed. When preloading with a custom event loop, user content MUST listen for this event to determine when to exit the loading animation loop.

This event has the following properties:

PropertyValue
bubblestrue
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe DisplayObject instance being added to the display list. The target is not always the object in the display list that registered the event listener. Use the currentTarget property to access the object in the display list that is currently processing the event.
rslsLoadedThe number of files that have downloaded successfully.
rslsFailedthe number of files that have failed to download.
rslsTotalthe total number of files that have downloaded, successfully or not.
failedURLsAn array of files that have failed to download.
         import fl.events.RSLErrorEvent;
         myPreloader.addEventListener(RSLErrorEvent.RSL_LOAD_FAILED, rslLoadFailedHandler);
         function rslLoadFailedHandler(e:RSLErrorEvent) {
         gotoAndPlay('rslLoadFailure');
         }
         

Related API Elements