Introducing coordy – An Actionscript 3 Layout Framework

After an extremely long wait, the Layout Organizers I began working on so long ago has finally been released as a full-fledged library named coordy. The code and documentation has finally reached a level of maturity where I feel comfortable offering it up to the public. The code is MIT licensed and begging to be used. Continue reading “Introducing coordy – An Actionscript 3 Layout Framework”

New Grassroots Campaign Aims to Save Some Developers

As a former front-end developer, I know the horrors of building HTML/CSS sites that work across all browsers. Frankly, the whole cross-browser conundrum was one reason why I got out of it a year or two ago. While I may not get paid to build static websites anymore, I obviously am still vulnerable to these problems with the sporadic interface/visual revamps I make to this blog and other minor web projects I take on. As the months go by, I see my ability to (reliably) develop HTML/CSS that will work in older browsers. That is why I really like the notion of what the Save the Developers campaign is trying to do.

The idea is extremely basic – get owners of websites to put a small amount of Javascript on their sites that encourages Internet Explorer 6 users to upgrade to a more standards-friendly browser. The organizers of the project were smart not to make this some evangelist movement for their favorite browser; rather opting users to choose any modern browser that fits their needs, including the mixed-bag which is Internet Explorer 7. I have decided to participate not only to save the blood pressure of front-end web developers across the world, but for my sake as well. I am a sucker for grassroots campaigns as many of you may know by now. For those of you who are front-end developers yet less fascinated with this sort of thing, may I suggest that the sooner we can get users off of obsolete browsers, the better our (professional) lives will be.

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.