我正試圖學習如何使用actionscript over mxml來獲得靈活性。我有MXML,我試圖將轉換爲動作的這個簡單的塊,但我雖然將mxml Rect&SolidColor轉換爲actionscript
<s:Rect id="theRect" x="0" y="50" width="15%" height="15%">
<s:fill>
<s:SolidColor color="black" alpha="0.9" />
</s:fill>
</s:Rect>
我可以轉換的矩形沒有問題
private var theRect:Rect = new Rect();
theRect.x = 0;
theRect.y = 50;
theRect.width = "15%";
theRect.height = "15%";
然後我被卡住了一半米卡在填充。儘可能在幾行代碼中添加SolidColor的最有效方法是什麼?
沒辦法,那簡單嗎?謝謝:) – touB 2010-03-19 05:48:15
我知道,我有時候也是這樣。沒問題。 – 2010-03-19 05:50:16