BaseUI is an AS3 layout manager and let you use layout properties (such as top, bottom, horizontalCenter, etc) on any DisplayObject instance. BaseUI also contains layout classes such as canvas, horizontal/vertical box, tile. You can also use a special “ratio mode” to easily show DisplayObject that will fit an area (backgrounds, etc).

You can use BaseUI in any flash site, except to include/distribute it in another framework, application, template, component or structure that is meant to build/scaffold/generate source files. BaseUI is at an earlier stage and part of another project, I’m just sharing it to help developers. Contact me for more details.

This work is licenced under a Mozilla Public License 1.1 (MPL 1.1)

Version 4.0

demo

source

docs

How to use (version 4.x.x)

Version 4 introduction tutorial

Version 3.0.3

demo BaseUI
demo CanvasUI
demo HBoxUI
demo VBoxUI
demo TileUI
demo Tween

source

docs

How to use (version 3.x.x)

BaseUI version 3 is working like the version 2. The big change is, some layouts have been added. See this post how to use them. A tutorial will be added in this page.

Version 2.0.4

demo

docs

download source

tutorial

How to use (version 2.x.x)

You have to create an instance of the BaseUI class and register some DisplayObject (like Sprite, MovieClip, TextField, Bitmap…).

Here are some properties:
x, y, left, right, top, bottom, width, height, horizontalCenter, verticalCenter, ratio, alignX, alignY

You can use percentage value for the width and height.

var baseUI:BaseUI = new BaseUI(this);
var element:ElementUI = baseUI.add(mySprite);
element.right = 10;
element.bottom = "10";
element.width = "50%"
element.height = 200;
addChild(mySprite);

Version 1.1.0

demo

docs

download source

tutorial

How to use (version 1.x.x)

You have to create an instance of the BaseUI class and register some DisplayObject (like Sprite, MovieClip, TextField, Bitmap…).

You can set the type of the DisplayObject to background or element.

You can choose a mode for the type background (ratio fit, ratio out and ratio in), this is the way it is going to fit the browser.

You can resize a type element in the width or the height (useful to draw line for example).

You can align your DisplayObject (left, center, right, top, bottom) and set a margin (left, right, top, bottom).

For example in your main class:

import com.soundstep.ui.*;
var baseUI:BaseUI = new BaseUI(this);
txt = new TextField();
txt.text = "TexField example";
var elText:ElementUI = baseUI.addElement(txt);
elText.alignX = ElementUI.ALIGN_CENTER;
elText.alignY = ElementUI.ALIGN_BOTTOM;
elText.marginBottom = 10;
addChild(txt);

Share and Enjoy!

    © soundstep.com
    Stay in Touch via Social Networks.