In the interests of building my little generative art App, I’ve decided I need some sort of window/palette system that’s robust and re-usable and looks, well, pretty cool. So I’ve made one and you can see it here.. The windows are (obviously) based on Apple’s nice little black translucent inspector windows, versions of which crop up in Aperture, Quicktime and so on. They drag from the top and bottom bars, they scale, open and close and they’re depth-managed.
There are two classes involved in all this: a WindowManager class that handles depths, focus and that very Appley drop shadow, and an Inspector class for the windows themselves. And it’s dead easy to use. Just instantiate WindowManager, add it to the stage and then tell it to create a new window with the settings you need, like so:
var winManager:WindowManager = new WindowManager();
winManager.newWindow(10, 10, 350, 200, 0.2, "My First Inspector");
That 0.2 in the newWindow() call is the fade speed in seconds, in case you were wondering. Here’s a zip of the source with the FLA as an example and the Classes.
UPDATED: They should now have the close button on the right-hand side automatically on a PC. I’m happy to say there’s no PC here to test it on, but it should work. Updated the zip too.