Hidden APIs of Flash, Flex, Flash Player, and AIR


Capabilities API - Know more about your users

Often, we develop applications which need to know about client-machine's capabilities in order to provide optimal experience. For example, we might need to know following in different scenarios:-

  • What is client's screen-resolution?

  • What is client's Operating-System (OS)?

  • What is Adobe Flash runtime (Flash Player or AIR) version?

  • What is system-language (English or German etc) of the machine?

  • What is player type (Standalone or browser-plugin)?

  • Does client have audio/video support?

  • Does client support accessibility aids (screen-readers etc)?

  • Does client support SSL/TLS transport?

  • Is client allowed to use Microphone/Webcam (in restricted/administrated environments - corporates/institutes etc)?



Adobe Flash runtimes (Flash Player and AIR) provide Capabilities API to know all these (above and more) about client-machine. You can use various static properties to determine various capabilities of client machine.

For example:-

//To know horizontal-screen-resolution
var screenResolutionX:Number = Capabilities.screenResolutionX;

//To know vertical screen-resolution
var screenResolutionY:Number = Capabilities.screenResolutionY;

//To know operating-system - returns "Window ", "Linux" or "MacOS".
//Where could be different versions (2000 or XP etc) of MS-Windows.
var operatingSystem:String = Capabilities.os;


Check out the Capabilities API to learn all about it.

Labels: ,




© 2006 Hidden APIs of Flash, Flex, Flash Player, and AIR


onFlex.org Stats