495
Chapter 24: Client system environment
This chapter explains how to interact with the user’s system. It shows you how to determine what features are
supported and how to build multilingual SWF files using the user’s installed input method editor (IME) if available.
It also shows typical uses for application domains.
Contents
Basics of the client system environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
Using the System class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
Using the Capabilities class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
Using the ApplicationDomain class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Using the IME class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
Example: Detecting system capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
Basics of the client system environment
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 users 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 AIRs
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

Get ADOBE® FLEX® 3: PROGRAMMING ACTIONSCRIPT™ 3.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.