转:http://hi.baidu.com/ls_mcx/item/becf6c5b08556d17da1635e9
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="left"
backgroundColor="white">
<mx:Script>
<![CDATA[
[Bindable]
public var resX:int = Capabilities.screenResolutionX;
[Bindable]
public var resY:int = Capabilities.screenResolutionY;
]]>
</mx:Script>
<mx:Label id="xW" text="{resX}"/>
<mx:Label id="xH" text="{resY}"/>
</mx:Application>