Posts Tagged ‘layout’

Click on one of the items below to go to the post

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. Read On…

Actionscript 3 Layout Organizers Examples and Source Code

A while back, I posted a basic example of layout organizers and layout organizers applied to video. I kept talking about how cool I considered this idea to be, yet I had yet to truly explain the idea and (more importantly) the source code for people to download. I wanted to make sure the code was at a good spot before releasing it; I believe that is now the case. You will find examples, the basic gist on how it works and some possible reasons why layout organizers may just make your life easier.

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

Read On…

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.