Packageflash.system
Classpublic class SystemUpdater
InheritanceSystemUpdater Inheritance EventDispatcher Inheritance Object

Language version: ActionScript 3.0
Runtime version: 

The SystemUpdater class allows you to update modules of the Flash Player, such as the DRM module for Adobe Access, as well as the Flash Player itself. Available modules are listed in the SystemUpdaterType class.

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

flash.system.SystemUpdaterType


Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined by
  
Constructor.
SystemUpdater
 Inherited
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
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
  
Begins an update of a given type.
SystemUpdater
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 EventSummaryDefined by
 Inherited [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
 Inherited [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
Constructor detail
SystemUpdater()constructor
public function SystemUpdater()

Language version: ActionScript 3.0
Runtime version: 

Constructor.

Method detail
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:

Parameters
type:String

See also

Event detail
cancelevent 
Event object type: flash.events.Event
Event.type property = 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:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetA reference to the object on which the operation is canceled.
completeevent  
Event object type: flash.events.Event
Event.type property = 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:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object that has completed loading.
ioErrorevent  
Event object type: flash.events.IOErrorEvent
IOErrorEvent.type property = 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:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
errorIDA reference number associated with the specific error (AIR only).
targetThe network object experiencing the input/output error.
textText to be displayed as an error message.
openevent  
Event object type: flash.events.Event
Event.type property = 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:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object that has opened a connection.
progressevent  
Event object type: flash.events.ProgressEvent
ProgressEvent.type property = 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:

PropertyValue
bubblesfalse
bytesLoadedThe number of items or bytes loaded at the time the listener processes the event.
bytesTotalThe total number of items or bytes that ultimately will be loaded if the loading process succeeds.
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe object reporting progress.
securityErrorevent  
Event object type: flash.events.SecurityErrorEvent
SecurityErrorEvent.type property = 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:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object reporting the security error.
textText to be displayed as an error message.
statusevent  
Event object type: flash.events.StatusEvent
StatusEvent.type property = 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:

Defines the value of the type property of a status event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
codeA description of the object's status.
currentTargetThe object that is actively processing the Event object with an event listener.
levelThe category of the message, such as "status", "warning" or "error".
targetThe object reporting its status.