Progress on the Layout Organizers Library

A long while back, I released a layout organizer library for Flash. The whole project was essentially an experiment-turned-released-code-collection and, as expected, there have been some growing pains going forward. I have been taking the time to rethink portions of the library and try to clean up and extend its functionality. One big push forward was the introduction of 3d layouts — however, it did not quite fit in with the prior structure. Well, I am very close to completing a fairly thorough rewrite of the library, which will be released in a less haphazard way. I have come to depend on this library for almost every project I have taken on — it just takes care of so much for you automatically. Continue reading “Progress on the Layout Organizers Library”

A Preview of 3d Layout Organizers

A while back, I published some work on AS3 layout organizers. The basic premise was to use virtual “containers” of a collection of DisplayObjects to create special layouts, such as a grid or ellipse. The project turned out to be quite enjoyable and I have used this library for almost every project I have worked on since I wrote it. With Flash 10’s introduction of 3d, it seemed appropriate to branch out these organizers into their 3d counterparts. In addition, I have spent a considerable amount of time re-writing a large portion of the core code to make it easier to use and more efficient. I was hoping to release the code in this post as well, but it just is not quite there yet. So, consider this a preview of the revamped library. Continue reading “A Preview of 3d Layout Organizers”

Actionscript 3 Layout Organizers

I have been playing with different layout configurations lately and, after seeing the advantages/disadvantages of Flex layouts, I decided to work on this experiment. Flex layouts are great because they allow easy visual organization of elements in containers. The problem with that is once an element is in a container, it cannot easily and flexibly change its layout position. For instance, a grid cannot really turn into a HBox and definitely cannot turn into more alternative layouts (such as a circular or random layout). I decided to make some Actionscript classes that would virtually mangage layouts – no containers, just managers. Meaning you subscribe an element to a layout (or multiple layouts) and they can be put into their correct layout position (or taken away) since they act independently.

Update: This code base has now been released under the name coordy. Read more.

You need the Flash Player to view this video.

The example above is a simple example of 50 sprites – all subscribed to different layouts. Clicking each layout button applies those elements to that particular layout. That layout can be changed, which in turn changes the elements subscribed to it. Those elements can also be broken down into sub layout organizers – allowing for some pretty cool stuff. This method is pretty lightweight as well since there are no actual containers for any of these objects. The objects can be tweened (as per the example above) by defining a tween function or just directly set to their respective positions. In addition, each layout is pretty small – meaning large amounts of layouts can be created with little hit on memory. This still has a while to go, but so far it has allowed me to do some fairly interesting things pretty quickly and reliably.