RectangleLayout

January 7, 2011

RectangleLayout is a custom layout that arranges visual components in a rectangle along the inside border of their parent container. For example, RectangleLayout could be used to arrange the tiles of a board game like Monopoly (but you’d need to set rotateElements="true").

Usage

<s:Group>
    ...
    <s:layout>
        <s:RectangleLayout horizontalGap="2" verticalGap="6" rotateElements="true" />
    </s:layout>
</s:Group>

Params

horizontalGap
The horizontal space between the items in pixels.
verticalGap
The vertical space between the items in pixels.
rotateElements
If true, then all elements in the layout will be rotated to point outwards. If false (the default), then the elements are un-rotated (aka they all point upwards).

Sample

NOTE: watch what happens as you move the num boxes slider.

Flash is required. Get it here!

full screen | view source | download

More Samples

MonopolyBoard

MonopolyBoard

full screen | view source | download

Author

Layout & sample by Justin.

Comments

1
4.21.2012

I like the monopoly board. I can’t find an example of how the code and download you provide fits into a full page. Is the result always a flash document? I must create, screen print, then change the flash into a picture.

Leave a Comment

  (required)

  (required)



Spam Protection by WP-SpamFree