Package | flash.system |
Class | public class SystemUpdater |
Inheritance | SystemUpdater EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Flash Player identifies the need for a Adobe-Access-module update by dispatching a NetStatusEvent event.
The event has a code
property with a value of "DRM.UpdateNeeded"
. For updates to the Adobe Access
module, user consent is not required. Listen for the event and initiate the update by calling
update("DRM")
.
Flash Player identifies the need for a player update by dispatching a StatusEvent event, with several
possible code
property values (see the status
event). For updates to the player,
user consent is required. Listen for the event and present the user with the option to update. The user must agree to the actual
update and initiate the update by, for example, clicking a button in the user interface. You can then
initiate the player update directly in ActionScript by calling update("SYSTEM")
.
Note: The SystemUpdater API is supported on all desktop platforms.
Related API Elements
Method | Defined By | ||
---|---|---|---|
Constructor. | SystemUpdater | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Cancels an active update. | SystemUpdater | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Begins an update of a given type. | SystemUpdater | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
Dispatched when an update of the player itself is cancelled by the user. | SystemUpdater | |||
Dispatched when the update completes. | SystemUpdater | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched when an I/O error occurs. | SystemUpdater | |||
Dispatched when an update begins. | SystemUpdater | |||
Dispatched to indicate download progress. | SystemUpdater | |||
Dispatched upon encountering a security error. | SystemUpdater | |||
Dispatched when the update fails. | SystemUpdater |
SystemUpdater | () | Constructor |
public function SystemUpdater()
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Constructor.
cancel | () | method |
public function cancel():void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Cancels an active update.
update | () | method |
public function update(type:String):void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Begins an update of a given type. Update types are one of the string constants defined in the SystemUpdaterType class. Only one update is allowed at a time across all browsers.
After the update begins, listen for the events defined in this class. The following events
events indicate the end of an update and allow a new update or update attempt to proceed,
as does calling the update()
function:
complete
cancel
securityError
ioError
status
Parameters
type:String |
Related API Elements
cancel | Event |
flash.events.Event
property Event.type =
flash.events.Event.CANCEL
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Dispatched when an update of the player itself is cancelled by the user.
This event is dispatched only when an update of type SystemUpdaterType.SYSTEM
is requested and the user cancels the update.
Event.CANCEL
constant defines the value of the type
property of a cancel
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | A reference to the object on which the operation is canceled. |
complete | Event |
flash.events.Event
property Event.type =
flash.events.Event.COMPLETE
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Dispatched when the update completes.
TheEvent.COMPLETE
constant defines the value of the type
property of a complete
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
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 network object that has completed loading. |
ioError | Event |
flash.events.IOErrorEvent
property IOErrorEvent.type =
flash.events.IOErrorEvent.IO_ERROR
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Dispatched when an I/O error occurs. For example, one error that can cause this event is a loss of Internet connectivity.
Defines the value of thetype
property of an ioError
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
errorID | A reference number associated with the specific error (AIR only). |
target | The network object experiencing the input/output error. |
text | Text to be displayed as an error message. |
open | Event |
flash.events.Event
property Event.type =
flash.events.Event.OPEN
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Dispatched when an update begins. The update is complete when a 'complete' event is sent, or when an IOErrorEvent, SecurityErrorEvent, or StatusEvent is sent.
TheEvent.OPEN
constant defines the value of the type
property of an open
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
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 network object that has opened a connection. |
progress | Event |
flash.events.ProgressEvent
property ProgressEvent.type =
flash.events.ProgressEvent.PROGRESS
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Dispatched to indicate download progress. This event is like the
progress
event in the Loader and URLLoader classes.
type
property of a progress
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
bytesLoaded | The number of items or bytes loaded at the time the listener processes the event. |
bytesTotal | The total number of items or bytes that ultimately will be loaded if the loading process succeeds. |
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 object reporting progress. |
securityError | Event |
flash.events.SecurityErrorEvent
property SecurityErrorEvent.type =
flash.events.SecurityErrorEvent.SECURITY_ERROR
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Dispatched upon encountering a security error. For example, a security error that can cause this event is if the player tries to perform an update when an update is not permitted by security policy.
TheSecurityErrorEvent.SECURITY_ERROR
constant defines the value of the type
property of a securityError
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
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 network object reporting the security error. |
text | Text to be displayed as an error message. |
status | Event |
flash.events.StatusEvent
property StatusEvent.type =
flash.events.StatusEvent.STATUS
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0, Flash Player 10.1 |
Dispatched when the update fails. An update can fail for one of the following reasons:
- The caller is running on an unsupported platform or architecture. In this case,
the value of the
code
property is "DRM.UpdateFailedNotSupported" and the value of thelevel
property is "error". - The requested update package cannot be located on the server. In this case,
the value of the
code
property is "DRM.UpdateFailedNotCurrentlyAvailable" and the value of thelevel
property is "error". - The Adobe Access module is not installed. This error is similar to the "DRM.UpdateNeeded" code,
which is dispatched by NetStatusEvent.
However, in this case, a more recent version of Flash Player must be downloaded first. In this case,
the value of the
code
property is "DRM.UpdateNeededButIncompatible" and the value of thelevel
property is "error". To perform an update of Flash Player, callSystemUpdater.update(SystemUpdaterType.SYSTEM)
. - The new DRM module could not be downloaded. In this case,
the value of the
code
property is "DRM.UpdateFailed" and the value of thelevel
property is "error".
type
property of a status
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
code | A description of the object's status. |
currentTarget | The object that is actively processing the Event object with an event listener. |
level | The category of the message, such as "status" , "warning" or "error" . |
target | The object reporting its status. |
Wed Nov 21 2018, 06:34 AM -08:00