Introduction to the client system environment
As you build more advanced ActionScript™ applications, you may find a need to know details about--and access functions of--your users' operating systems. The client system environment is a collection of classes in the flash.system package that allow you to access system-level functionality such as the following:
- Determining which application and security domain a SWF is executing in
- Determining the capabilities of the user's Flash® Player or Adobe® AIR™ instance, such as the screen size (resolution) and whether certain functionality is available, such as mp3 audio
- Building multilingual sites using the IME
- Interacting with the Flash Player's container (which could be an HTML page or a container application) or AIR's container.
- Saving information to the user's clipboard
The flash.system package also includes the IMEConversionMode and SecurityPanel classes. These classes contain static constants that you use with the IME and Security classes, respectively.
Common client system environment tasks
The following common tasks for working with the client system using ActionScript are described in this chapter:
- Determining how much memory your application is using
- Copying text to the user's clipboard
- Determining capabilities of the user's computer, such as:
- Screen resolution, color, DPI, and pixel aspect ratio
- Operating system
- Support for streaming audio, streaming video, and mp3 playback
- Whether the installed Flash Player is a debugger version
- Working with application domains:
- Defining an application domain
- Separating SWF files' code into application domains
- Working with an IME in your application:
- Determining whether an IME is installed
- Determining and setting the IME conversion mode
- Disabling the IME for text fields
- Detecting when IME conversion happens
Important concepts and terms
The following reference list contains important terms used in this chapter:
- Operating system: The main program that runs on a computer, within which all other applications run--such as Microsoft Windows, Mac OS X, or Linux®.
- Clipboard: The operating system's container for holding text or items that are copied or cut, and from which items are pasted into applications.
- Application domain: A mechanism for separating classes used in different SWF files, so that if the SWF files include different classes with the same name, the classes don't overwrite each other.
- IME (input method editor): A program (or operating system tool) that is used to enter complex characters or symbols using a standard keyboard.
- Client system: In programming terms, a client is the part of an application (or whole application) that runs on an individual's computer and is used by a single user. The client system is the underlying operating system on the user's computer.