Package | flash.system |
Class | public class SystemUpdater |
Inheritance | SystemUpdater EventDispatcher Object |
Language version: | ActionScript 3.0 |
Runtime version: |
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.
See also
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 version: |
Constructor.
cancel | () | method |
public function cancel():void
Language version: | ActionScript 3.0 |
Runtime version: |
Cancels an active update.
update | () | method |
public function update(type:String):void
Language version: | ActionScript 3.0 |
Runtime version: |
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
type:String |
See also
cancel | event |
flash.events.Event
flash.events.Event.CANCEL
Language version: | ActionScript 3.0 |
Runtime version: |
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.
The 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
flash.events.Event.COMPLETE
Language version: | ActionScript 3.0 |
Runtime version: |
Dispatched when the update completes.
The Event.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
flash.events.IOErrorEvent.IO_ERROR
Language version: | ActionScript 3.0 |
Runtime version: |
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 the type
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
flash.events.Event.OPEN
Language version: | ActionScript 3.0 |
Runtime version: |
Dispatched when an update begins. The update is complete when a 'complete' event is sent, or when an IOErrorEvent, SecurityErrorEvent, or StatusEvent is sent.
The Event.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
flash.events.ProgressEvent.PROGRESS
Language version: | ActionScript 3.0 |
Runtime version: |
Dispatched to indicate download progress. This event is like the
progress
event in the Loader and URLLoader classes.
Defines the value of the 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
flash.events.SecurityErrorEvent.SECURITY_ERROR
Language version: | ActionScript 3.0 |
Runtime version: |
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.
The SecurityErrorEvent.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
flash.events.StatusEvent.STATUS
Language version: | ActionScript 3.0 |
Runtime version: |
Dispatched when the update fails. An update can fail for one of the following reasons:
code
property is "DRM.UpdateFailedNotSupported" and the value of the
level
property is "error".code
property is "DRM.UpdateFailedNotCurrentlyAvailable" and the
value of the level
property is "error".code
property is "DRM.UpdateNeededButIncompatible" and the value of the
level
property is "error". To perform an update
of Flash Player, call SystemUpdater.update(SystemUpdaterType.SYSTEM)
.code
property is "DRM.UpdateFailed" and the value of the
level
property is "error".
Defines the value of the 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. |