Landscape Zoomer

Another sample component in my continuing quest to spread the word about how expressive Flex applications can be.

This component was inspired by a number of really nice flash sites I’ve seen over the past number of years that make effective use of zooming to navigate information in a way only flash can do. In the right circumstances, a good zoom is the perfect way to both give the user a 1000 foot view of data and quickly drive them down to explore the details as necessary.

So the Landscape component makes it easy to do just that. By default, it essentially behaves like a Canvas component, laying out its children absolutely, sizing itself to the smallest size that can contain them all. But you can pass it any collection of descendants (children, or children’s children, etc), and it will automatically zoom in to the tightest area possible that contains the ’selected’ descendants.

Simple in theory, but fairly versatile in the effects you can achieve with it. Here are three sample applications that use the Landscape component in very different ways.

There’s lots more work to do on this one, but my plate’s pretty full these days, so I wanted to put it out there.

As always, these are released under the MIT open source license, so feel free to take ‘em, extend ‘em, improve ‘em. Let me know if you find them useful.

Comments, feedback, suggestions? Leave them for me here.


Categories