tim richter

The new AS3-Layout-Framework is now available in the addicted2flash library.

The architecture is straight forward and easy to understand (hopefully). It is basically constructed on top of two abstract interfaces named IComponent and IContainer. The main difference between them is the possiblity to add components.

The layout framework itself is encapsulated from the displaylist, but every Component holds a reference to an Sprite.

To make these components more flexible and powerful, IComponent extends ILayoutObservable, an interface that provides functionality for other objects to listen to specific layout events (f.e. changing of the bounds).

If you are interested in writing custom IComponent or IContainer implementations, please take a look at How to write custom LayoutComponents.

The following uml-diagram shows the core architecture of the layout framework:
Actionscript 3.0 Layout Framework

The layout framework can be found in the addicted2flash library.

References:

[GHJV95] E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns: “ Elements of Reusable Object-Oriented Software, Addison-Wesley, 1995

6 COMMENTS
December 29, 2009
ad

thank you
thank youthank youthank youthank youthank youthank youthank you

March 21, 2010
ad

Are there some examples of how to use the framework? Thanks!

tim
March 22, 2010
ad

hi misho,

take a look at VBox, HBox, Canvas or FlowBox.

regards
tim

April 26, 2010
ad

Hello, Tim!
Great work! I really love your framework.
But I have some troubles with ScrollPane. Can you show an example how to use it? Just some lines of code in right order.

tim
May 14, 2010
ad

hi eldar,

please check out the post about the ScrollPane.

May 18, 2010
ad

Thank you very much, Tim.
It’s clear now.

Post a comment