ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
System

Package | flash.system
Class | public final class System
Inheritance | System Object

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

The System class contains properties related to certain operations that take place on the user's computer, such as operations with shared objects, local settings for cameras and microphones, and use of the Clipboard.

Additional properties and methods are in other classes within the flash.system package: the Capabilities class, the Security class, and the IME class.

This class contains only static methods and properties. You cannot create new instances of the System class.

View the examples

See also

flash.system.Security
flash.events.IMEEvent
Using the System class

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | ime : IME [static] [read-only] The currently installed system IME. | System
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object
|  | totalMemory : uint [static] [read-only] The amount of memory (in bytes) currently in use by Adobe® Flash® Player. | System
|  | useCodePage : Boolean [static] A Boolean value that tells Flash Player which code page to use to interpret external text files. | System

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | exit(code:uint):void [static] Closes the Flash Player. | System
|  | gc():void [static] Forces the garbage collection process. | System
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | pause():void [static] Pauses the Flash Player. | System
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | resume():void [static] Resumes the Flash Player after using System.pause(). | System
|  | setClipboard(string:String):void [static] Replaces the contents of the Clipboard with a specified text string. | System
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

ime | property

`ime:IME` [read-only]

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

The currently installed system IME. To register for imeComposition events, call `addEventListener()` on this instance.

Implementation
`public static function get ime():IME`

See also

IMEConversionMode
Using the System class

totalMemory | property |

`totalMemory:uint` [read-only]

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

The amount of memory (in bytes) currently in use by Adobe® Flash® Player.

Implementation
`public static function get totalMemory():uint`

See also

Using the System class

useCodePage | property |

`useCodePage:Boolean` [read-write]

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

A Boolean value that tells Flash Player which code page to use to interpret external text files. When the property is set to `false`, Flash Player interprets external text files as Unicode. (These files must be encoded as Unicode when you save them.) When the property is set to `true`, Flash Player interprets external text files using the traditional code page of the operating system running the player. The default value of `useCodePage` is `false`.

Text that you load as an external file (using `flash.display.Loader.load()` or the flash.net.URLLoader, flash.net.URLStream, or XML class) must have been saved as Unicode in order for Flash Player to recognize it as Unicode. To encode external files as Unicode, save the files in an application that supports Unicode, such as Notepad on Windows 2000.

If you load external text files that are not Unicode-encoded, set `useCodePage` to `true`. Add the following as the first line of code in the first frame of the SWF file that is loading the data:

    System.useCodePage = true;

When this code is present, Flash Player interprets external text using the traditional code page of the operating system running Flash Player. This is generally CP1252 for an English Windows operating system and Shift-JIS for a Japanese operating system. If you set `useCodePage` to `true`, Flash Player 6 and later treat text as Flash Player 5 does. (Flash Player 5 treated all text as if it were in the traditional code page of the operating system running the player.)

If you set `useCodePage` to `true`, remember that the traditional code page of the operating system running the player must include the characters used in your external text file in order to display your text. For example, if you load an external text file that contains Chinese characters, those characters cannot display on a system that uses the CP1252 code page because that code page does not include Chinese characters.

To ensure that users on all platforms can view external text files used in your SWF files, you should encode all external text files as Unicode and leave `useCodePage` set to `false`. This way, Flash Player 6 and later interprets the text as Unicode.

Implementation
`public static function get useCodePage():Boolean`
`public function set useCodePage(value:Boolean):void`

See also

flash.display.Loader.load()
Using the System class
Method Detail

exit | () | method

`public static function exit(code:uint):void`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9.0.115.0

Closes the Flash Player.

For the standalone Flash Player debugger version only.

Parameters

| `code:uint` — A value to pass to the operating system. Typically, if the process exits normally, the value is 0.

gc | () | method |

`public static function gc():void`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9.0.115.0

Forces the garbage collection process.

For Flash Player debugger version only.

pause | () | method |

`public static function pause():void`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9.0.115.0

Pauses the Flash Player. After calling this method, nothing in the player continues except the delivery of Socket events.

For Flash Player debugger version only.

resume | () | method |

`public static function resume():void`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9.0.115.0

Resumes the Flash Player after using `System.pause()`.

For Flash Player debugger version only.

setClipboard | () | method |

`public static function setClipboard(string:String):void`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 9

Replaces the contents of the Clipboard with a specified text string.

Note: Because of security concerns, it is not possible to read the contents of the system Clipboard. In other words, there is no corresponding `System.getClipboard()` method.

Parameters

| `string:String` — A plain-text string of characters to put on the system Clipboard, replacing its current contents (if any).

See also

Using the System class
Examples How to use examples
SystemExample.as
The following example shows how to copy information about your system's total memory to the system Clipboard using a call to `System.totalMemory` within a call to the `System.setClipboard()` method.

    package {
        import flash.display.Sprite;
        import flash.system.System;

        public class SystemExample extends Sprite {
            public function SystemExample() {
                System.setClipboard("System.totalMemory: " + System.totalMemory);
            }
        }
    }

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00