Debug Flash Player Capabilities

The below code debugs the capabilities of system, might be useful for debugging.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml&#8221; layout=”horizontal”
initialize=”init()”>
<mx:Script>
<![CDATA[
import flash.system.Capabilities;
import mx.utils.ObjectUtil;
private function init() : void
{
var _capObj:Array = new Array();
capability.dataProvider = objectToArray(Capabilities);
}
private function objectToArray(cap:Class) : Array
{
var capObj:Object = ObjectUtil.getClassInfo(cap);
var _capArr:Array = new Array();
for each (var _capPropObj:Object in capObj.properties)
{
if (_capPropObj.localName != “prototype”)
{
var capProp:Object = new Object();
capProp.Capability = _capPropObj.localName;
capProp.Value =Capabilities[capProp.Capability]
_capArr.push(capProp);
}
}
return _capArr;
}
]]>
</mx:Script>
<mx:DataGrid id=”capability” width=”100%” height=”100%” />
</mx:Application>

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: