The following example shows you how you can change the direction of a Box container in Flex by setting the
direction property to one of the constants in the BoxDirection class. The <mx:Box /> container is the superclass of the HBox container and VBox container. The subclasses (HBox and VBox) do not add any new functionality, they simply set the
direction property automatically to “horizontal” or “vertical”.
Full code after the jump.