You are viewing the archives of the original Pixelfumes blog. This blog is no longer maintained. All of the content available on this site is available on the new Pixelfumes blog in addition to all of our new posts! Visit: http://blog.pixelfumes.com.

« Home | AS3 Problem Targeting MovieClips Containing Nested... » | AMP (Adobe Media Player) Beta Available on Labs » | I Bought an iPod Touch » | The Photoshop Family and logos » | iFreelance: My Adobe AIR Derby Submission » | Adobe onAir Bus Tour Pittsburgh Video » | 1080p Movs, MP4, Non-FLV playback in Flash Player ... » | Adobe Fireworks CS3 Kuler Panel Released » | Adobe onAIR Pittsburgh » | My New Adobe Dev Center Article: Creating the Kule... » 

Tuesday, October 23, 2007 

AS3 OSX Leopard-like "Stacks" Class with Source

Its no secret that I have become quite the Apple fan. Given that, I have been eagerly awaiting the release of OS X Leopard. Leopard has a neat new feature called "Stacks" related to the dock. If you want to learn more about the new dock and stacks you can do so here.

I thought it would be neat to pay homage to Apple and give a go at creating "Stacks" in AS3. In the demo below you can view my attempt. It took me awhile to dig through sites for a good actionscript-based equation that would give me a curve that I liked.

As3 is awesome - you can really pass any type of Display Object into the stack using the stackInstance.addItem() method. It expects a MovieClip - the demo below just uses one that I made in the library. The stack items can really look and be whatever you like.

This is open source so feel free to improve and mod the class. Please share any improvements you have. As always, any link-backs or references are appreciated when using my classes.







If you want to play with the class you can download the class and FLA for the example above.

Very nice. Could make a nice minimal nav on a site.

Would be nice if the items looked like they are coming out of the container item. At the moment they seem to overlap it and appear on top for me.

I know you did this as a close of stacks in Leopard, but in making this do you see any advantage of these items being displayed along a curve, opposed to them just being vertical?

I agree with the previous poster's comment about the stack being vertical. I don't know if OS 10.5 will allow for this, but I would much prefer a vertical stack than a curved one, it just looks neater and easier to read.

hehe I almost made a full switch from winXP to OSX and so far I love it :)

nice one for the stack menu,
for the curve part
it make sens when you don't want the menu over your actual content but a little bit on the side

Great stuff man, looks very clean.

Seems to break the close it gets to 0...I don't understand the point of curving your content (it just makes makes it longer to take in all the information) and it's a shame Apple had take this effect over the top because now we'll be seeing it everywhere =|

Lovely! It's never straight up and down in nature. Some people love to drop a grid on the rolling hills of San Francisco and it just makes no sense. Bang that curve in there!

in what dock on a pc can this be installed in? I don't quite understand how to use it! sorry for my ignorance! :D

This isn't for a dock exactly. It is just a proof of concept of a "stack" written in ActionScript. Now, the AIR version that I wrote could be used on a PC but I never released the source or installer for that one.

Nice work!!
Sorry about my ignorance but and now how can you install and run this on Leopard?

Ciao! :)

Leopard already has stacks. This is a Flash example of the same sort of idea. You could use the source and create an AIR app from it to run it in your OS.

I'm tinkering with this a bit and was wondering (probably can't figure this out because I'm SUPER sleep-deprived right now lol) how to change the 'stack item' so that each item is different? Thanks in advance!

The code in the FLA:
var si1:StackItem = new StackItem();
si1.label_txt.text = "Stack Item";
si1.num_txt.text = "Item " + i;
stack1.addItem(si1);
Will allow you to set Stack items as different labels, etc. In order to change them drastically you will want to modify the Stack class.

The code in the FLA:
var si1:StackItem = new StackItem();
si1.label_txt.text = "Stack Item";
si1.num_txt.text = "Item " + i;
stack1.addItem(si1);
Will allow you to set Stack items as different labels, etc. In order to change them drastically you will want to modify the Stack class.

Post a Comment