(Beta)
Package | fl.events |
Class | public class RSLEvent |
Inheritance | RSLEvent Event Object |
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10.1, AIR 2 |
RSLPreloader
. These events
indicate progress in downloading RSLs, including information on the number of files and
the number of bytes loaded. When a custom event preloading loop is used, and the
RSLPreloader code is generated automatically by Flash authoring, these events are
dispatched by the main timeline. In this case, use addEventListener
without needing to
reference the RSLPreloader.
Related API Elements
Public Properties
Property | Defined By | ||
---|---|---|---|
bubbles : Boolean [read-only]
Indicates whether an event is a bubbling event. | Event | ||
bytesLoaded : int [read-only]
Returns the total number of downloaded bytes in files that have successfully downloaded. | RSLEvent | ||
bytesTotal : int [read-only]
Returns the total number of downloaded bytes in files that have downloaded, successful or not. | RSLEvent | ||
cancelable : Boolean [read-only]
Indicates whether the behavior associated with the event can be prevented. | Event | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
currentTarget : Object [read-only]
The object that is actively processing the Event object with an event listener. | Event | ||
eventPhase : uint [read-only]
The current phase in the event flow. | Event | ||
rslsFailed : int [read-only]
Returns the number of files that have failed to download. | RSLEvent | ||
rslsLoaded : int [read-only]
Returns the number of files that have downloaded successfully. | RSLEvent | ||
rslsTotal : int [read-only]
Returns the total number of files that have downloaded, successfully or not. | RSLEvent | ||
target : Object [read-only]
The event target. | Event | ||
type : String [read-only]
The type of event. | Event |
Public Methods
Method | Defined By | ||
---|---|---|---|
RSLEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, rslsLoaded:int = 0, rslsFailed:int = 0, rslsTotal:int = 0, bytesLoaded:int = 0, bytesTotal:int = 0)
Creates an Event object with specific information relevant to RSL events. | RSLEvent | ||
Duplicates an instance of an Event subclass. | Event | ||
A utility function for implementing the toString() method in custom
ActionScript 3.0 Event classes. | Event | ||
Indicates whether an object has a specified property defined. | Object | ||
Checks whether the preventDefault() method has been called on the event. | Event | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Cancels an event's default behavior if that behavior can be canceled. | Event | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Prevents processing of any event listeners in the current node and any subsequent nodes in
the event flow. | Event | ||
Prevents processing of any event listeners in nodes subsequent to the current node in the
event flow. | Event | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns a string containing all the properties of the Event object. | Event | ||
Returns the primitive value of the specified object. | Object |
Public Constants
Constant | Defined By | ||
---|---|---|---|
RSL_LOAD_COMPLETE : String = "rslLoadComplete" [static]
Event dispatched by RSLPreloader when all RSLs have successfully
downloading. | RSLEvent | ||
RSL_PROGRESS : String = "rslProgress" [static]
Event dispatched by RSLPreloader to indicate progress in
downloading RSL files. | RSLEvent |
Property Detail
bytesLoaded | property |
bytesTotal | property |
rslsFailed | property |
rslsLoaded | property |
rslsTotal | property |
Constructor Detail
RSLEvent | () | Constructor |
public function RSLEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, rslsLoaded:int = 0, rslsFailed:int = 0, rslsTotal:int = 0, bytesLoaded:int = 0, bytesTotal:int = 0)
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10.1, AIR 2 |
Creates an Event object with specific information relevant to RSL events.
Parameterstype: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.
| |
bytesLoaded:int (default = 0 ) — The total number of downloaded bytes in files that have successfully downloaded.
| |
bytesTotal:int (default = 0 ) — The total number of downloaded bytes in files that have downloaded, successful or not.
|
Constant Detail
RSL_LOAD_COMPLETE | Constant |
public static const RSL_LOAD_COMPLETE:String = "rslLoadComplete"
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10.1, AIR 2 |
Event dispatched by RSLPreloader
when all RSLs have successfully
downloading. The bytesLoaded
and bytesTotal
properties
are always 0 for this event type. 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:
Property | Value |
---|---|
bubbles | true |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The 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. |
rslsLoaded | The number of files that have downloaded successfully. |
rslsFailed | the number of files that have failed to download. |
rslsTotal | the total number of files that have downloaded, successfully or not. |
bytesLoaded | The total number of downloaded bytes in files that have successfully downloaded. |
bytesTotal | the total number of downloaded bytes in files that have downloaded, successful or not. |
import fl.events.RSLEvent; myPreloader.addEventListener(RSLEvent.RSL_LOAD_COMPLETE, loadComplete); function loadComplete(e:RSLEvent) { gotoAndPlay('startOfContent'); }
Related API Elements
RSL_PROGRESS | Constant |
public static const RSL_PROGRESS:String = "rslProgress"
Language Version: | ActionScript 3.0 |
Product Version: | Flash CS5 |
Runtime Versions: | Flash Player 10.1, AIR 2 |
Event dispatched by RSLPreloader
to indicate progress in
downloading RSL files. This is the only event type for which the
bytesLoaded
and bytesTotal
properties are non-zero.
This event has the following properties:
Property | Value |
---|---|
bubbles | true |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The 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. |
rslsLoaded | The number of files that have downloaded successfully. |
rslsFailed | the number of files that have failed to download. |
rslsTotal | the total number of files that have downloaded, successfully or not. |
bytesLoaded | The total number of downloaded bytes in files that have successfully downloaded. |
bytesTotal | the total number of downloaded bytes in files that have downloaded, successful or not. |
import fl.events.RSLEvent; myPreloader.addEventListener(RSLEvent.RSL_PROGRESS, progressHandler); function progressHandler(e:RSLEvent) { trace('rslsLoaded = ' + e.rslsLoaded); trace('rslsFailed = ' + e.rslsFailed); trace('rslsTotal = ' + e.rslsTotal); trace('bytesLoaded = ' + e.bytesLoaded); trace('bytesTotal = ' + e.bytesTotal); }
Related API Elements
Wed Nov 21 2018, 06:34 AM -08:00