HBox 是横向布局,VBox是重向布局。
HBox、VBox组件都有属性horizontalAlign ,horizontalCenter,verticalAlign,verticalCenter。
而horizontalAlign ,horizontalCenter是水平居中,verticalAlign,verticalCenter是垂直居中。
例如:
<mx:HBox width="100%" height="100%" verticalCenter="0" verticalAlign="middle" horizontalAlign="center" horizontalCenter="0">
<mx:VBox height="100%" verticalAlign="middle" horizontalAlign="center">
<mx:Button verticalCenter="0" label="上" width="10" height="50" fillAlphas="0" click="prev_pic(event)"/>
</mx:VBox>
<mx:Button icon="@Embed('assets/nextbutton_up.png')" width="10" height="50"/>
</mx:HBox>
horizontalAlign 的属性值是left(左边),center(中间),right(右边)。
verticalAlign的属性值是top(顶部),middle(中间),bottom(底部)。
而horizontalCenter,verticalCenter都是绝对布局。
</pre><pre>