| Package | flash.system |
| Class | public final class Shell |
| Inheritance | Shell EventDispatcher Object |
The shell is a singleton object, created automatically at application startup.
Get the shell instance with the static property, Shell.shell.
| Property | Defined by | ||
|---|---|---|---|
| autoExit : Boolean
Specifies whether the application should automatically terminate when all windows
have been closed.
| Shell | ||
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance.
| Object | |
| id : String
[read-only] The application ID of this application.
| Shell | ||
![]() | prototype : Object
[static]
A reference to the prototype object of a class or function object.
| Object | |
| shell : Shell
[static][read-only]
Obtains the singleton instance of the Shell class.
| Shell | ||
| Method | Defined by | ||
|---|---|---|---|
|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Register an event listener.
| Shell | ||
|
Dispatch an event.
| Shell | ||
|
exit():void
Terminates this application.
| Shell | ||
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event.
| EventDispatcher | |
![]() |
Removes a listener from the EventDispatcher object.
| EventDispatcher | |
![]() |
Sets the availability of a dynamic property for loop operations.
| Object | |
![]() |
Returns the string representation of the specified object.
| Object | |
![]() |
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 | ||
|---|---|---|---|---|
| Dispatched when this application becomes active. | Shell | |||
![]() | Dispatched when Flash Player gains operating system focus and becomes active. | EventDispatcher | ||
| Dispatched when this application becomes inactive. | Shell | |||
![]() | Dispatched when Flash Player loses operating system focus and is becoming inactive. | EventDispatcher | ||
| Dispatched when an application is invoked. | Shell | |||
| Dispatched when either a new network connection becomes available or an existing network connection is lost. | Shell | |||
| autoExit | property |
autoExit:Boolean [read-write]
Specifies whether the application should automatically terminate when all windows
have been closed. By default, its value is true.
public function get autoExit():Boolean
public function set autoExit(value:Boolean):void
| id | property |
id:String [read-only]The application ID of this application. The value of this ID is set in the application descriptor file (application.xml).
Implementation public function get id():String
| shell | property |
shell:Shell [read-only]Obtains the singleton instance of the Shell class.
Implementation public static function get shell():Shell
| addEventListener | () | method |
public override function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):voidRegister an event listener.
Parameterstype:String |
|
listener:Function |
|
useCapture:Boolean (default = false) |
|
priority:int (default = 0) |
|
useWeakReference:Boolean (default = false) |
| dispatchEvent | () | method |
public override function dispatchEvent(event:Event):BooleanDispatch an event.
Parametersevent:Event |
Boolean |
| exit | () | method |
public function exit():voidTerminates this application.
The call to exit will return; the shutdown sequence does not begin until the currently executing code (i.e., the current event handler) has completed.
Note that closing and close events will not be not dispatched by application windows. If windows should be notified before your application exits, you can dispatch closing events for each open window. If a window close event is required by application logic, call the window close method before exiting.
| activate | event |
flash.events.Event
flash.events.Event.ACTIVATE
Dispatched when this application becomes active.
Note: In this Alpha release of Apollo, the activate event is only dispatched when the automatically created, initial window of the application becomes active.
Defines the value of the type property of an activate event object.
Note: This event does not go through a "capture phase" and is dispatched directly to the target, whether the target is on the display list or not.
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 | Any DisplayObject instance with a listener registered for the ACTIVATE event. |
| deactivate | event |
flash.events.Event
flash.events.Event.DEACTIVATE
Dispatched when this application becomes inactive.
Note: In this Alpha release of Apollo, the deactivate event is only dispatched when the automatically created, initial window of the application becomes inactive.
Defines the value of the type property of a deactivate event object.
Note: This event does not go through a "capture phase" and is dispatched directly to the target, whether the target is on the display list or not.
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 | Any DisplayObject instance with a listener registered for the DEACTIVATE event. |
| invoke | event |
flash.events.InvokeEvent
flash.events.InvokeEvent.INVOKE
Dispatched when an application is invoked. InvokeEvents are queued until a listener is registered. When an application is invoked a second time, another instance of the application is not started. Instead, the first instance receives an additional invocation event. It is the responsibility of the application to handle subsequent invocation events appropriately.
flash.events.InvokeEvent.INVOKE defines the value of the type
property of an InvokeEvent event object.
The InvokeEvent object has the following properties:
| Properties | Values |
|---|---|
arguments | the array of string arguments passed during this invocation. |
currentDirectory | a File object representing the directory that should be used to resolve any relative paths in the arguments array. |
bubbles | No. |
cancelable | false;
There is no default behavior to cancel. |
currentTarget | Indicates the object that is actively processing this InvokeEvent object with an event listener. |
target | Always the Shell object. |
| networkChange | event |
flash.events.Event
flash.events.Event.NETWORK_CHANGE
Dispatched when either a new network connection becomes available or an existing network connection is lost.
A network change event does not necessarily mean that the host computer has gone online or offline; it may just be transitioning from one type of connection to another. Applications can use this event to help optimize the task of monitoring remote resource availability. The dispatch of a network change event is a good time to check any remote resources. Note that there may be a short delay between a network change and the delivery of this event.
Defines the value of the type property of a networkChange 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 Shell object. |
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/apollo/1.0/aslr/flash/system/Shell.html