The System.capabilities class determines the abilities of the system and player hosting a SWF file, which lets you tailor content for different formats. For example, the screen of a cell phone (black and white, 100 square pixels) is different than the 1000-square-pixel color PC screen. To provide appropriate content to as many users as possible, you can use the System.capabilities object to determine the type of device a user has. You can then either specify to the server to send different SWF files based on the device capabilities or tell the SWF file to alter its presentation based on the capabilities of the device.
The following table lists the properties that are not supported by the System.capabilites class when using ActionScript for Flash Lite 2.x and later.
|
Property |
Description |
|---|---|
| hasIME |
Indicates whether the system has an input method editor (IME) installed. |
| manufacturer |
A string that indicates the manufacturer of Flash Player, in the format "Adobe OSName" (OSName could be "Windows", "Macintosh", "Linux", or "Other OS Name"). |
| pixelAspectRatio |
Indicates the pixel aspect ratio of the screen. |
| playerType |
Indicates the type of player: stand-alone, external, plug-in, or ActiveX. |
| screenColor |
Indicates whether the screen is color, grayscale, or black and white. |
| screenDPI |
Indicates the screen resolution, in pixels (such as dpi). |
| serverString |
A URL-encoded string that specifies values for each System.capabilities property. |
The following table lists properties that are extensions to the System.capabilites class for use with ActionScript for Flash Lite 2.x and later.
|
Property |
Description |
|---|---|
| hasCompoundSound |
A read-only Boolean value that is true if the player can process compound sound data; false otherwise. |
| hasEmail |
A read-only Boolean value that is true if the player can send e-mail messages using the GetURL ActionScript command; false otherwise. |
| hasMMS |
A read-only Boolean value that is true if the player can send multimedia message service (MMS) messages using the GetURL ActionScript command; false otherwise. |
| hasSMS |
A read-only value whose variable _capSMS indicates whether Flash Lite can send short message service (SMS) messages using the GetURL ActionScript command. If Flash Lite can send SMS messages, this variable is defined and has a value of 1. Otherwise, this variable is not defined. |
| hasMFI |
A read-only Boolean value that is true if the player can play sound data in the Melody Format for i-mode (MFi) audio format; false otherwise. |
| hasMIDI |
A read-only Boolean value that is true if the player can play sound data in the MIDI audio format; false otherwise. |
| hasSMAF |
A read-only Boolean value that is true if the player can play sound data in the Synthetic music Mobile Application Format (SMAF); false otherwise. |
| hasDataLoading |
A read-only Boolean value that is true if the player can dynamically load additional data through calls to loadMovie(), loadMovieNum(), loadVariables(), loadVariablesNum(), XML.parseXML(), Sound.loadSound(), MovieClip.loadVariables(), MovieClip.loadMovie(), MovieClipLoader.loadClip(), LoadVars.load(), and LoadVars.sendAndLoad(); false otherwise. |
| has4WayKeyAS |
A read-only Boolean value that is true if the player can execute ActionScript attached to keyEvent handlers associated with the right, left, up and down keys; false otherwise. If the value of this variable is true, when one of the four-way keys is pressed, the player first looks for a handler for that key. If none is found, Flash control navigation is performed. However, if an event handler is found, no navigation action occurs for that key. In other words, the presence of a keypress handler for a down key disables the ability to navigate down. |
| hasMouse |
A read-only Boolean value that is true if the player can send mouse-related events and false if the platform does not support a mouse. |
| hasMappableSoftKeys |
Allows user to set soft-key values and handle events from those soft keys. |
| hasStylus |
A read-only Boolean value that is true if the player can send stylus-related events and false if the platform does not support a stylus. The onMouseMove event is not supported by a stylus. This flag allows the content to check if this event is supported. |
| hasCMIDI |
A read-only Boolean value that is true if the platform supports CMIDI sound, and false if the platform does not support CMIDI sound. |
| hasXMLSocket |
(Added in Flash Lite 2.1) Indicates whether the host application supports XML sockets. |
| softKeyCount |
A number specifying the number of soft keys that the platform supports. |
| hasSharedObjects |
A read-only Boolean value that is true if Flash content playing back in this application can access Flash Lite shared objects; false otherwise. |
| hasQWERTYKeyboard |
A read-only Boolean value that is true if ActionScript can be attached to all keys found on a standard QWERTY keyboard and the Backspace key; false otherwise. |
| audioMIMETypes |
A read-only property that contains an array of MIME types that the device's audio codecs support and that can be used by the ActionScript Sound object. |
| imageMIMETypes |
A read-only property that contains an array of MIME types that the device's image codecs support and that can be used by the loadMovie ActionScript function. |
| videoMIMETypes |
A read-only property that contains an array of MIME types that the device's video codecs support and that can be used by the ActionScript Video object. |
| MIMETypes |
A read-only property that contains an array of all the MIME types that the Sound and Video objects support and that can be used by the loadMovie() ActionScript function. |
Send me an e-mail when comments are added to this page | Comment Report