Layout Manager

Ever since Flex came out people have been after similar functionality for Flash. There aren’t many options out there, but a few worth mentioning are http://www.soundstep.com/blog/downloads/baseui/ and http://www.nbilyk.com/flash-layout-manager. After studying these (great) diferent approaches, I decided to give it a try and build my own version, similarities not a coincidence.

LayoutManager and LayoutElement

LayoutElement extends a DisplayObject’s size and positioning properties. Both size and position can be specified in pixels or percentage of a container. LayoutManager manages LayoutElements and updates them as necessary.

LayoutManager Demo

LayoutContainer

LayoutContainer extends Flash’s UIComponent and works much like ScrollPane, except it’s content can be added/removed directly just like any other DisplayObjectContainer.

Layout Containers

Layouts Containers, such as Canvas, HBox and VBox, extends from the LayoutContainer class and add LayoutManager and LayoutElement functionality.

HBox Demo

Advertisements

One Response to Layout Manager

  1. Scott says:

    Hi,

    Great work! I’m trying to use the vBox demo and i’m getting error, looks like something with the configUI() call going up to the base class. Do you have an example of a VBox with elements inside of it? Ideally I would like to get display objects into a vBox and arrange them with percentages of the vBox

    Thanks,

    Scott

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: