写道
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="component.*" creationComplete="init()">
<mx:Script>
<![CDATA[
private function init():void{
var m:Matrix = new Matrix();
m.rotate((Math.PI/12)*(-1));
m.tx = 200;
m.ty = 200;
btn.transform.matrix = m;
}
]]>
</mx:Script>
<mx:Button id="btn" x="200" y="200" label="Button" width="126" height="56"/>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="component.*" creationComplete="init()">
<mx:Script>
<![CDATA[
private function init():void{
var m:Matrix = new Matrix();
m.rotate((Math.PI/12)*(-1));
m.tx = 200;
m.ty = 200;
btn.transform.matrix = m;
}
]]>
</mx:Script>
<mx:Button id="btn" x="200" y="200" label="Button" width="126" height="56"/>
</mx:Application>
id 为 "btn" 的button 就能倾斜30度。 注意 m.tx 和 m.ty 要写在m.rotate之后。详情注意 matrix 妙用....