The following example uses the playerType, version, and isDebugger properties of the Capabilities class to display information about the Player:
<?xml version="1.0"?>
<!-- logging/CheckDebugger.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
import flash.system.Capabilities;
private function reportVersion():String {
if (Capabilities.isDebugger) {
return "Debugger version of Flash Player";
} else {
return "Flash Player";
}
}
private function reportType():String {
return Capabilities.playerType + " (" + Capabilities.version + ")";
}
]]></mx:Script>
<mx:Label text="{reportVersion()}"/>
<mx:Label text="{reportType()}"/>
</mx:Application>
Other properties of the Capabilities class include hasPrinting, os, and language.
No comments:
Post a Comment