Home > programming > AS 3.0 layout manager

AS 3.0 layout manager

February 25th, 2008 admin Leave a comment Go to comments

I’ve created a custom layout manager in AS 3.0 which provides some of the automatic scaling and positioning that Flex provides.

You can register objects and specify a size to maintain relative to the stage size, alignment, padding and set a function that is called when the screen is resized.

This is a first version and it may (and most likely will) change in the future.

Download: LayoutManager.as and LayoutTarget.as

Categories: programming Tags:
  1. March 28th, 2008 at 16:11 | #1

    NIce work raph, I would be interested in seeing a little example AS3 app applying your logic :)

  2. March 28th, 2008 at 16:11 | #2

    sorry I meant ‘ralph’, I hate typos on names ;)

  3. admin
    March 29th, 2008 at 15:37 | #3

    I created this class in the context of http://www.hilfigerdenim.com, which I built. When you resize the window, you will notice that everything either scales along (like background images and the main menu) or keeps its relative position (like the bottom taskbar).
    In the code you can see which methods are available, but if you would like comments explaining them let me know and I will add them as soon as I find the time :)

  4. Ricardo
    September 14th, 2008 at 05:06 | #4

    Looks like a nice work but we need an example …we’re beginners ! :)

  5. admin
    September 16th, 2008 at 10:04 | #5

    I’ve put a really simple example online that shows a square that’s kept at half the width and half the height of the stage, and is always center aligned.
    Download the example code at http://www.rockabit.com/downloads/layoutmanager_example.zip

  1. No trackbacks yet.