Posted: May 30th, 2009 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments
The Canvas arranges its child components to their desired size regarding to their minimum and maximum size. It is possible to add an CanvasConstraint while adding a component to a Canvas. This constraint is an encapsulation of values used in an absolute layout (top, left, right, bottom) like in CSS.
Posted: May 28th, 2009 | Categories: Actionscript 3.0, Tools | 2 Comments
There are several possibilities to create swc libraries or assets. You can use embed tags wihing as-classes to force the compiler to include assets directly into your physical swf or you can use the flash IDE to link your assets in the library and publish them afterwards or at least use the flex oem compiler to compile your assets from the console.
There is a catch with all of these possibilities (in my opinion). The flash IDE is not open source, I always forget the syntax of the embed tags and using the console is failure prone.
Posted: May 20th, 2009 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments
An Vbox arranges its child components vertically according to their desired size. If the size is is declared in percentage values, it will set the components bounds percentaged to the space left filled by fixed size components.
NOTE: percentaged values of child components are just handled if the desired size of the HBox was set explicitly.
Posted: April 27th, 2009 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments
An Hbox arranges its child components horizontally according to their desired size. If the size is is declared in percentage values, it will set the components bounds percentaged to the space left filled by fixed size components.
NOTE: percentaged values of child components are just handled if the desired size of the HBox was set explicitly.
Posted: April 26th, 2009 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments
After talking with some users about the usability of the AS3-Layout-Framework, I realized that the dynamic layout approach (layout strategies totally independent from containers) seemed to be a bit confusing or too complicated.
To prevent this issue, I choose the approach of concrete containers like in C#. Now, every container has its own layout strategy implemented. F.e. an HBox can layout its child components horizontal and a FlowPanel can also align them in a specific way.
With regard to a gui-system on top, this approach has its advantages (first of all simplicity).
During the next days, I will adapt the old class diagrams and update the repository.
Posted: November 28th, 2008 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments
For those readers who are not familiar with the architecture of the AS3-Layout-Framework, here is a short introduction.
Which base class should you use?
The answer is very simple. If the needed component has no subcomponents, use UIComponent. If other components should be added and also be laid out, use UIContainer instead.
Posted: November 21st, 2008 | Categories: AS3-Layout-Framework, Actionscript 3.0 | No Comments
A FlowPanel arranges IUIComponents in a row/column until no more IUIComponents fit in that row/column. The IUIComponents will be arranged to their preferred size.
In addition the FlowPanel offers the possibility to choose different align and flow settings which are also modifiable at runtime.
Posted: October 26th, 2008 | Categories: AS3-Layout-Framework, Actionscript 3.0, Design Patterns | No Comments
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 IUIComponent and IUIContainer. The main difference between them is the possiblity to add components.
Posted: August 26th, 2008 | Categories: Actionscript 3.0, Design Patterns | 2 Comments
Very often it is necessary to use an obervable-pattern in its basic structure, which means that the observable notifies registered observers after its internal state has changed.
This implementation concept is very static and has the side effect that the observers are notified every time the model has changed regardless of which change they are interested in.
In this case it is recommended to use a more dynamic approach like an specific observable.
But if you only have one value in the model which changes, the MicroObservable structure could be very useful.
Posted: August 25th, 2008 | Categories: Actionscript 3.0, Design Patterns | No Comments
With the loader queue it is easy to load data (f.e images or xml) application wide in a priority queue. This version uses encapsulated ILoader implementations and is therefore easy to extend.
The loader queue has the following tokens:
priority
stop/pause/resume services
remove services
In addition it is possible to parametrize the loaded data with an anchor that could be of any type. This is very useful when images belong to specific objects (see code example).
For a new need of a loader implementation a programmer just had to write a new specific loader strategy that implements ILoader.
Basic implementations like a Loader and a URLLoader for loading Loader and URLLoader specific data can be found in the addicted2flash library.