| Package | flash.system |
| Class | public final class Capabilities |
| Inheritance | Capabilities Object |
You can send a player's capabilities information, which is stored in the
Capabilities.serverString property as a URL-encoded string, using the
GET or POST HTTP method. The following example shows a server
string for a computer that has MP3 support and 1600 x 1200 pixel resolution and that is
running Windows XP with an Input Method Editor (IME) installed:
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%209%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&IME=t
The following table lists the possible ActionScript properties and corresponding server strings:
| ActionScript property | Server string |
|---|---|
avHardwareDisable |
AVD |
hasAccessibility |
ACC |
hasAudio |
A |
hasAudioEncoder |
AE |
hasEmbeddedVideo |
EV |
hasIME |
IME |
hasMP3 |
MP3 |
hasPrinting |
PR |
hasScreenBroadcast |
SB |
hasScreenPlayback |
SP |
hasStreamingAudio |
SA |
hasStreamingVideo |
SV |
hasTLS |
TLS |
hasVideoEncoder |
VE |
isDebugger |
DEB |
language |
L |
localFileReadDisable |
LFD |
manufacturer |
M |
os |
OS |
pixelAspectRatio |
AR |
playerType |
PT |
screenColor |
COL |
screenDPI |
DP |
screenResolutionX |
R |
screenResolutionY |
R |
version |
V |
All properties of the Capabilities class are read-only.
View the examples.| Property | Defined by | ||
|---|---|---|---|
| avHardwareDisable : Boolean
[static][read-only]
Specifies whether access to the user's camera and microphone has
been administratively prohibited (
true) or allowed (false). | Capabilities | ||
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance.
| Object | |
| hasAccessibility : Boolean
[static][read-only]
Specifies whether the player is running in an environment that supports
(
true) or does not support (false) communication
with accessibility aids. | Capabilities | ||
| hasAudio : Boolean
[static][read-only]
Specifies whether the player is running on a system that has audio
capabilities.
| Capabilities | ||
| hasAudioEncoder : Boolean
[static][read-only]
Specifies whether the player can (
true) or cannot (false)
encode an audio stream, such as that coming from a microphone. | Capabilities | ||
| hasEmbeddedVideo : Boolean
[static][read-only]
Specifies whether the player is running on a system that supports
(
true) or does not support (false)
embedded video. | Capabilities | ||
| hasIME : Boolean
[static][read-only]
Specifies whether the player is running on a system that does (
true)
or does not (false) have an input method editor (IME) installed. | Capabilities | ||
| hasMP3 : Boolean
[static][read-only]
Specifies whether the player is running on a system that does (
true)
or does not (false) have an MP3 decoder. | Capabilities | ||
| hasPrinting : Boolean
[static][read-only]
Specifies whether the player is running on a system that does (
true)
or does not (false) support printing. | Capabilities | ||
| hasScreenBroadcast : Boolean
[static][read-only]
Specifies whether the player does (
true) or does not (false)
support the development of screen broadcast applications to be run through Flash Media
Server. | Capabilities | ||
| hasScreenPlayback : Boolean
[static][read-only]
Specifies whether the player does (
true) or does not
(false) support the playback of screen broadcast applications
that are being run through Flash Media Server. | Capabilities | ||
| hasStreamingAudio : Boolean
[static][read-only]
Specifies whether the player can (
true) or cannot (false)
play streaming audio. | Capabilities | ||
| hasStreamingVideo : Boolean
[static][read-only]
Specifies whether the player can (
true) or cannot
(false) play streaming video. | Capabilities | ||
| hasTLS : Boolean
[static][read-only]
Specifies whether the player is on a system that supports native SSL sockets through NetConnection
(
true) or does not (false). | Capabilities | ||
| hasVideoEncoder : Boolean
[static][read-only]
Specifies whether the player can (
true) or cannot
(false) encode a video stream, such as that coming
from a web camera. | Capabilities | ||
| isDebugger : Boolean
[static][read-only]
Specifies whether the player is a special debugging version
(
true), or an officially released version (false). | Capabilities | ||
| language : String
[static][read-only]
Specifies the language code of the system on which the player is running.
| Capabilities | ||
| localFileReadDisable : Boolean
[static][read-only]
Specifies whether read access to the user's hard disk has been
administratively prohibited (
true) or allowed
(false). | Capabilities | ||
| manufacturer : String
[static][read-only]
Specifies the manufacturer of Flash Player, in the format "
Macromedia
OSName". | Capabilities | ||
| os : String
[static][read-only]
Specifies the current operating system.
| Capabilities | ||
| pixelAspectRatio : Number
[static][read-only]
Specifies the pixel aspect ratio of the screen.
| Capabilities | ||
| playerType : String
[static][read-only]
Specifies the type of player.
| Capabilities | ||
![]() | prototype : Object
[static]
A reference to the prototype object of a class or function object.
| Object | |
| screenColor : String
[static][read-only]
Specifies the screen color.
| Capabilities | ||
| screenDPI : Number
[static][read-only]
Specifies the dots-per-inch (dpi) resolution of the screen, in pixels.
| Capabilities | ||
| screenResolutionX : Number
[static][read-only]
Specifies the maximum horizontal resolution of the screen.
| Capabilities | ||
| screenResolutionY : Number
[static][read-only]
Specifies the maximum vertical resolution of the screen.
| Capabilities | ||
| serverString : String
[static][read-only]
A URL-encoded string that specifies values for each Capabilities
property.
| Capabilities | ||
| version : String
[static][read-only]
Specifies the Flash Player platform and version information.
| Capabilities | ||
avHardwareDisable:Boolean [read-only]true) or allowed (false).
The server string is AVD.
public static function get avHardwareDisable():Boolean
| flash.media.Camera.getCamera(), flash.media.Microphone.getMicrophone(), Security.showSettings() |
hasAccessibility:Boolean [read-only]true) or does not support (false) communication
with accessibility aids.
The server string is ACC.
public static function get hasAccessibility():Boolean
| flash.accessibility.Accessibility.active, flash.accessibility.Accessibility.updateProperties() |
hasAudio:Boolean [read-only]true. The server
string is A.
public static function get hasAudio():Boolean
hasAudioEncoder:Boolean [read-only]true) or cannot (false)
encode an audio stream, such as that coming from a microphone.
The server string is AE.
public static function get hasAudioEncoder():Boolean
hasEmbeddedVideo:Boolean [read-only]true) or does not support (false)
embedded video. The server string is EV.
public static function get hasEmbeddedVideo():Boolean
hasIME:Boolean [read-only]true)
or does not (false) have an input method editor (IME) installed.
The server string is IME.
public static function get hasIME():Boolean
| flash.system.IME, flash.system.System.ime |
hasMP3:Boolean [read-only]true)
or does not (false) have an MP3 decoder.
The server string is MP3.
public static function get hasMP3():Boolean
hasPrinting:Boolean [read-only]true)
or does not (false) support printing.
The server string is PR.
public static function get hasPrinting():Boolean
hasScreenBroadcast:Boolean [read-only]true) or does not (false)
support the development of screen broadcast applications to be run through Flash Media
Server.
The server string is SB.
public static function get hasScreenBroadcast():Boolean
hasScreenPlayback:Boolean [read-only]true) or does not
(false) support the playback of screen broadcast applications
that are being run through Flash Media Server.
The server string is SP.
public static function get hasScreenPlayback():Boolean
hasStreamingAudio:Boolean [read-only]true) or cannot (false)
play streaming audio.
The server string is SA.
public static function get hasStreamingAudio():Boolean
hasStreamingVideo:Boolean [read-only]true) or cannot
(false) play streaming video.
The server string is SV.
public static function get hasStreamingVideo():Boolean
hasTLS:Boolean [read-only]true) or does not (false).
The server string is TLS.
public static function get hasTLS():Boolean
| flash.net.NetConnection.proxyType, flash.net.NetConnection.connectedProxyType, flash.net.NetConnection.usingTLS |
hasVideoEncoder:Boolean [read-only]true) or cannot
(false) encode a video stream, such as that coming
from a web camera.
The server string is VE.
public static function get hasVideoEncoder():Boolean
isDebugger:Boolean [read-only]true), or an officially released version (false).
The server string is DEB.
public static function get isDebugger():Boolean
language:String [read-only]fr specifies French.
On English systems, this property returns only the language code (en), not
the country code. On Microsoft Windows systems, this property returns the user interface (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 | Value |
|---|---|
| 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 |
The server string is L.
public static function get language():String
localFileReadDisable:Boolean [read-only]true) or allowed
(false). If this property is true,
Flash Player cannot 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 load methods
will fail if this property is set to true.
Reading runtime shared libraries is also 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.
public static function get localFileReadDisable():Boolean
| flash.display.Loader |
manufacturer:String [read-only]Macromedia
OSName". The value for OSName
could be "Windows", "Macintosh",
"Linux", or "Other OS Name". The server string is M.
public static function get manufacturer():String
os:String [read-only]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.
public static function get os():String
pixelAspectRatio:Number [read-only]AR.
public static function get pixelAspectRatio():Number
playerType:String [read-only]"StandAlone" for the stand-alone Flash Player"External" for the external Flash Player or in test mode"PlugIn" for the Flash Player browser plug-in"ActiveX" for the Flash Player ActiveX control used by Microsoft Internet ExplorerThe server string is PT.
public static function get playerType():String
screenColor:String [read-only]color", "gray" (for grayscale), or
"bw" (for black and white).
The server string is COL.
public static function get screenColor():String
screenDPI:Number [read-only]DP.
public static function get screenDPI():Number
screenResolutionX:Number [read-only]R (which returns both the width and height of the screen).
public static function get screenResolutionX():Number
screenResolutionY:Number [read-only]R (which returns both the width and height of the screen).
public static function get screenResolutionY():Number
serverString:String [read-only]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%2C5%2C0%2C208&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
public static function get serverString():String
version:String [read-only]"WIN",
"MAC", and "UNIX". Here are some examples of
version information:
WIN 9,0,0,0 // Flash Player 9 for Windows MAC 7,0,25,0 // Flash Player 7 for Macintosh UNIX 5,0,55,0 // Flash Player 5 for UNIX
The server string is V.
public static function get version():String
trace().
package {
import flash.display.Sprite;
import flash.system.Capabilities;
public class CapabilitiesExample extends Sprite {
public function CapabilitiesExample() {
showCapabilities();
}
private function showCapabilities():void {
trace("avHardwareDisable: " + Capabilities.avHardwareDisable);
trace("hasAccessibility: " + Capabilities.hasAccessibility);
trace("hasAudio: " + Capabilities.hasAudio);
trace("hasAudioEncoder: " + Capabilities.hasAudioEncoder);
trace("hasEmbeddedVideo: " + Capabilities.hasEmbeddedVideo);
trace("hasMP3: " + Capabilities.hasMP3);
trace("hasPrinting: " + Capabilities.hasPrinting);
trace("hasScreenBroadcast: " + Capabilities.hasScreenBroadcast);
trace("hasScreenPlayback: " + Capabilities.hasScreenPlayback);
trace("hasStreamingAudio: " + Capabilities.hasStreamingAudio);
trace("hasVideoEncoder: " + Capabilities.hasVideoEncoder);
trace("isDebugger: " + Capabilities.isDebugger);
trace("language: " + Capabilities.language);
trace("localFileReadDisable: " + Capabilities.localFileReadDisable);
trace("manufacturer: " + Capabilities.manufacturer);
trace("os: " + Capabilities.os);
trace("pixelAspectRatio: " + Capabilities.pixelAspectRatio);
trace("playerType: " + Capabilities.playerType);
trace("screenColor: " + Capabilities.screenColor);
trace("screenDPI: " + Capabilities.screenDPI);
trace("screenResolutionX: " + Capabilities.screenResolutionX);
trace("screenResolutionY: " + Capabilities.screenResolutionY);
trace("serverString: " + Capabilities.serverString);
trace("version: " + Capabilities.version);
}
}
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/labs/flashauthoringpreview/flash/system/Capabilities.html