System

Class capabilities

Object


public class capabilities
extends Object

Player version: Flash Player 6

The 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.

You can send capabilities information using a GET or POST HTTP method. The following example shows a server string for a computer that has MP3 support, 1600 x 1200 pixel resolution, is running Windows XP, and Flash Player 8 (8.0.0.0):

 A=t&SA=t&SV=t&EV=t&MP3=t&AE=t&VE=t&ACC=f&PR=t&SP=t&
SB=f&DEB=t&V=WIN%208%2C0%2C0%2C0&M=Macromedia%20Windows&
R=1600x1200&DP=72&COL=color&AR=1.0&OS=Windows%20XP&
L=en&PT=External&AVD=f&LFD=f&WD=f"

All properties of the System.capabilities object are read-only.




Property Summary
static avHardwareDisable : Boolean  [read-only]
A Boolean value that specifies whether access to the user's camera and microphone has been administratively prohibited (true) or allowed (false).
static hasAccessibility : Boolean  [read-only]
A Boolean value that is true if the player is running in an environment that supports communication between Flash Player and accessibility aids; false otherwise.
static hasAudio : Boolean  [read-only]
Specifies if the system has audio capabilities.
static hasAudioEncoder : Boolean  [read-only]
Specifies if the Flash Player can encode an audio stream.
static hasEmbeddedVideo : Boolean  [read-only]
A Boolean value that is true if the player is running on a system that supports embedded video; false otherwise.
static hasIME : Boolean  [read-only]
Indicates whether the system has an input method editor (IME) installed.
static hasMP3 : Boolean  [read-only]
Specifies if the system has a MP3 decoder.
static hasPrinting : Boolean  [read-only]
A Boolean value that is true if the player is running on a system that supports printing; false otherwise.
static hasScreenBroadcast : Boolean  [read-only]
A Boolean value that is true if the player supports the development of screen broadcast applications to be run through the Flash Communication Server; false otherwise.
static hasScreenPlayback : Boolean  [read-only]
A Boolean value that is true if the player supports the playback of screen broadcast applications that are being run through the Flash Communication Server; false otherwise.
static hasStreamingAudio : Boolean  [read-only]
A Boolean value that is true if the player can play streaming audio; false otherwise.
static hasStreamingVideo : Boolean  [read-only]
A Boolean value that is true if the player can play streaming video; false otherwise.
static hasVideoEncoder : Boolean  [read-only]
Specifies if the Flash Player can encode a video stream.
static isDebugger : Boolean  [read-only]
A Boolean value that indicates whether the player is an officially released version (false) or a special debugging version (true).
static language : String  [read-only]
Indicates the language of the system on which the player is running.
static localFileReadDisable : Boolean  [read-only]
A Boolean value that indicates whether read access to the user's hard disk has been administratively prohibited (true) or allowed (false).
static manufacturer : String  [read-only]
A string that indicates the manufacturer of Flash Player, in the format "Macromedia OSName" (OSName could be "Windows", "Macintosh", "Linux", or "Other OS Name").
static os : String  [read-only]
A string that indicates the current operating system.
static pixelAspectRatio : Number  [read-only]
An integer that indicates the pixel aspect ratio of the screen.
static playerType : String  [read-only]
A string that indicates the type of player.
static screenColor : String  [read-only]
A string that indicates the screen color.
static screenDPI : Number  [read-only]
A number that indicates the dots-per-inch (dpi) resolution of the screen, in pixels.
static screenResolutionX : Number  [read-only]
An integer that indicates the maximum horizontal resolution of the screen.
static screenResolutionY : Number  [read-only]
An integer that indicates the maximum vertical resolution of the screen.
static serverString : String  [read-only]
A URL-encoded string that specifies values for each System.capabilities property.
static version : String  [read-only]
A string containing the Flash Player platform and version information (for example, "WIN 8,0,0,0").

Properties inherited from class Object
__proto__, __resolve, constructor, prototype


Method Summary

Methods inherited from class Object
addProperty, hasOwnProperty, isPropertyEnumerable, isPrototypeOf, registerClass, toString, unwatch, valueOf, watch


Property Detail

avHardwareDisable Property

public static avHardwareDisable : Boolean  [read-only]

Player version: Flash Player 7

A Boolean value that specifies whether access to the user's camera and microphone has been administratively prohibited (true) or allowed (false). The server string is AVD.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.avHardwareDisable);

See also
Camera.get(), Microphone.get(), System.showSettings()

hasAccessibility Property

public static hasAccessibility : Boolean  [read-only]

Player version: Flash Player 6

A Boolean value that is true if the player is running in an environment that supports communication between Flash Player and accessibility aids; false otherwise. The server string is ACC.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasAccessibility);

See also
Accessibility.isActive(), Accessibility.updateProperties(), _accProps

hasAudio Property

public static hasAudio : Boolean  [read-only]

Player version: Flash Player 6

Specifies if the system has audio capabilities. A Boolean value that is true if the player is running on a system that has audio capabilities; false otherwise. The server string is A.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasAudio);


hasAudioEncoder Property

public static hasAudioEncoder : Boolean  [read-only]

Player version: Flash Player 6

Specifies if the Flash Player can encode an audio stream. A Boolean value that is true if the player can encode an audio stream, such as that coming from a microphone; false otherwise. The server string is AE.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasAudioEncoder);


hasEmbeddedVideo Property

public static hasEmbeddedVideo : Boolean  [read-only]

Player version: Flash Player 6,0,65,0

A Boolean value that is true if the player is running on a system that supports embedded video; false otherwise. The server string is EV.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasEmbeddedVideo);


hasIME Property

public static hasIME : Boolean  [read-only]

Player version: Flash Player 8

Indicates whether the system has an input method editor (IME) installed. A value of true indicates that the player is running on a system that has an IME installed; a value of false indicates that no IME is installed. The server string is IME.

Example
The following example sets the IME to ALPHANUMERIC_FULL if the player is running on a system that has an IME installed.
if(System.capabilities.hasIME) {
    trace(System.IME.getConversionMode());
    System.IME.setConversionMode(System.IME.ALPHANUMERIC_FULL);
    trace(System.IME.getConversionMode());
}


hasMP3 Property

public static hasMP3 : Boolean  [read-only]

Player version: Flash Player 6

Specifies if the system has a MP3 decoder. A Boolean value that is true if the player is running on a system that has an MP3 decoder; false otherwise. The server string is MP3.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasMP3);


hasPrinting Property

public static hasPrinting : Boolean  [read-only]

Player version: Flash Player 6,0,65,0

A Boolean value that is true if the player is running on a system that supports printing; false otherwise. The server string is PR.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasPrinting);


hasScreenBroadcast Property

public static hasScreenBroadcast : Boolean  [read-only]

Player version: Flash Player 6,0,79,0

A Boolean value that is true if the player supports the development of screen broadcast applications to be run through the Flash Communication Server; false otherwise. The server string is SB.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasScreenBroadcast);


hasScreenPlayback Property

public static hasScreenPlayback : Boolean  [read-only]

Player version: Flash Player 6,0,79,0

A Boolean value that is true if the player supports the playback of screen broadcast applications that are being run through the Flash Communication Server; false otherwise. The server string is SP.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasScreenPlayback);


hasStreamingAudio Property

public static hasStreamingAudio : Boolean  [read-only]

Player version: Flash Player 6,0,65,0

A Boolean value that is true if the player can play streaming audio; false otherwise. The server string is SA.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasStreamingAudio);


hasStreamingVideo Property

public static hasStreamingVideo : Boolean  [read-only]

Player version: Flash Player 6,0,65,0

A Boolean value that is true if the player can play streaming video; false otherwise. The server string is SV.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasStreamingVideo);


hasVideoEncoder Property

public static hasVideoEncoder : Boolean  [read-only]

Player version: Flash Player 6

Specifies if the Flash Player can encode a video stream. A Boolean value that is true if the player can encode a video stream, such as that coming from a web camera; false otherwise. The server string is VE.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.hasVideoEncoder);


isDebugger Property

public static isDebugger : Boolean  [read-only]

Player version: Flash Player 6

A Boolean value that indicates whether the player is an officially released version (false) or a special debugging version (true). The server string is DEB.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.isDebugger);


language Property

public static language : String  [read-only]

Player version: Flash Player 6 — Behavior changed in Flash Player 7.

Indicates the language of the system on which the player is running. This property is specified as a lowercase two-letter language code from ISO 639-1. For Chinese, an additional uppercase two-letter country code subtag from ISO 3166 distinguishes between Simplified and Traditional Chinese. The languages themselves are named with the English tags. For example, fr specifies French.

This property changed in two ways for Flash Player 7. First, the language code for English systems no longer includes the country code. In Flash Player 6, all English systems return the language code and the two-letter country code subtag (en-US). In Flash Player 7, English systems return only the language code (en). Second, on Microsoft Windows systems this property now returns the User Interface (UI) Language. In Flash Player 6 on the Microsoft Windows platform, System.capabilities.language returns the User Locale, which controls settings for formatting dates, times, currency and large numbers. In Flash Player 7 on the Microsoft Windows platform, this property now returns the UI Language, which refers to the language used for all menus, dialog boxes, error messages and help files. The following table lists the possible values:

Language Tag
Czech cs
Danish da
Dutch nl
English en
Finnish fi
French fr
German de
Hungarian hu
Italian it
Japanese ja
Korean ko
Norwegian no
Other/unknown xu
Polish pl
Portuguese pt
Russian ru
Simplified Chinese zh-CN
Spanish es
Swedish sv
Traditional Chinese zh-TW
Turkish tr

Example
The following example traces the value of this read-only property:
trace(System.capabilities.language);


localFileReadDisable Property

public static localFileReadDisable : Boolean  [read-only]

Player version: Flash Player 7

A Boolean value that indicates whether read access to the user's hard disk has been administratively prohibited (true) or allowed (false). If set to true, Flash Player will be unable to read files (including the first SWF file that Flash Player launches with) from the user's hard disk. For example, attempts to read a file on the user's hard disk using XML.load(), LoadMovie(), or LoadVars.load() will fail if this property is set to true.

Reading runtime shared libraries will also be blocked if this property is set to true, but reading local shared objects is allowed without regard to the value of this property. The server string is LFD.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.localFileReadDisable);


manufacturer Property

public static manufacturer : String  [read-only]

Player version: Flash Player 6

A string that indicates the manufacturer of Flash Player, in the format "Macromedia OSName" (OSName could be "Windows", "Macintosh", "Linux", or "Other OS Name"). The server string is M.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.manufacturer);


os Property

public static os : String  [read-only]

Player version: Flash Player 6

A string that indicates the current operating system. The os property can return the following strings: "Windows XP", "Windows 2000", "Windows NT", "Windows 98/ME", "Windows 95", "Windows CE" (available only in Flash Player SDK, not in the desktop version), "Linux", and "MacOS". The server string is OS.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.os);


pixelAspectRatio Property

public static pixelAspectRatio : Number  [read-only]

Player version: Flash Player 6

An integer that indicates the pixel aspect ratio of the screen. The server string is AR.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.pixelAspectRatio);


playerType Property

public static playerType : String  [read-only]

Player version: Flash Player 7

A string that indicates the type of player. This property can have one of the following values:

The server string is PT.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.playerType);


screenColor Property

public static screenColor : String  [read-only]

Player version: Flash Player 6

A string that indicates the screen color. This property can have the value "color", "gray" or "bw", which represents color, grayscale, and black and white, respectively. The server string is COL.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.screenColor);


screenDPI Property

public static screenDPI : Number  [read-only]

Player version: Flash Player 6

A number that indicates the dots-per-inch (dpi) resolution of the screen, in pixels. The server string is DP.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.screenDPI);


screenResolutionX Property

public static screenResolutionX : Number  [read-only]

Player version: Flash Player 6

An integer that indicates the maximum horizontal resolution of the screen. The server string is R (which returns both the width and height of the screen).

Example
The following example traces the value of this read-only property:
trace(System.capabilities.screenResolutionX);


screenResolutionY Property

public static screenResolutionY : Number  [read-only]

Player version: Flash Player 6

An integer that indicates the maximum vertical resolution of the screen. The server string is R (which returns both the width and height of the screen).

Example
The following example traces the value of this read-only property:
trace(System.capabilities.screenResolutionY);


serverString Property

public static serverString : String  [read-only]

Player version: Flash Player 6

A URL-encoded string that specifies values for each System.capabilities property.

The following example shows a URL-encoded string:

A=t&SA=t&SV=t&EV=t&MP3=t&AE=t&VE=t&ACC=f&PR=t&SP=t&
SB=f&DEB=t&V=WIN%208%2C0%2C0%2C0&M=Macromedia%20Windows&
R=1600x1200&DP=72&COL=color&AR=1.0&OS=Windows%20XP&
L=en&PT=External&AVD=f&LFD=f&WD=f

Example
The following example traces the value of this read-only property:
trace(System.capabilities.serverString);


version Property

public static version : String  [read-only]

Player version: Flash Player 6

A string containing the Flash Player platform and version information (for example, "WIN 8,0,0,0"). The server string is V.

Example
The following example traces the value of this read-only property:
trace(System.capabilities.version);