PackageSystem
Classpublic class capabilities
Inheritancecapabilities Inheritance 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.



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

Implementation
    public static function get avHardwareDisable():Boolean

See also


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

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

Implementation
    public static function get hasAccessibility():Boolean

See also


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

hasAudioproperty 
hasAudio:Boolean  [read-only]

Player version: Flash Player 6

Specifies if the player is running on a system that has audio capabilities. In Flash Player, this property is always true. The server string is A.

Implementation
    public static function get hasAudio():Boolean

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

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

Implementation
    public static function get hasAudioEncoder():Boolean

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

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

Implementation
    public static function get hasEmbeddedVideo():Boolean

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

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

Implementation
    public static function get hasIME():Boolean

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());
}

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

Implementation
    public static function get hasMP3():Boolean

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

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

Implementation
    public static function get hasPrinting():Boolean

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

hasScreenBroadcastproperty 
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 Media Server; false otherwise. The server string is SB.

Implementation
    public static function get hasScreenBroadcast():Boolean

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

hasScreenPlaybackproperty 
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 Media Server; false otherwise. The server string is SP.

Implementation
    public static function get hasScreenPlayback():Boolean

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

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

Implementation
    public static function get hasStreamingAudio():Boolean

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

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

Implementation
    public static function get hasStreamingVideo():Boolean

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

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

Implementation
    public static function get hasVideoEncoder():Boolean

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

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

Implementation
    public static function get isDebugger():Boolean

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

languageproperty 
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

Implementation
    public static function get language():String

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

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

Implementation
    public static function get localFileReadDisable():Boolean

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

manufacturerproperty 
manufacturer:String  [read-only]

Player version: Flash Player 6

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

Implementation
    public static function get manufacturer():String

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

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

Implementation
    public static function get os():String

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

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

Implementation
    public static function get pixelAspectRatio():Number

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

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

Implementation
    public static function get playerType():String

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

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

Implementation
    public static function get screenColor():String

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

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

Implementation
    public static function get screenDPI():Number

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

screenResolutionXproperty 
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).

Implementation
    public static function get screenResolutionX():Number

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

screenResolutionYproperty 
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).

Implementation
    public static function get screenResolutionY():Number

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

serverStringproperty 
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

Implementation
    public static function get serverString():String

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

versionproperty 
version:String  [read-only]

Player version: Flash Player 6

A string that contains the Flash Player platform and version information. The server string is V. The format of the version number is: "platform majorVersion, minorVersion, buildNumber, internalBuildNumber". Possible values for platform are "WIN", "MAC", and "UNIX". For example:

  WIN 8,0,22,0  // Flash Player 8 for Windows
  MAC 7,0,25,0  // Flash Player 7 for Macintosh
  UNIX 5,0,55,0 // Flash Player 5 for UNIX
  

Implementation
    public static function get version():String

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