gabriel montagné láscaris comneno

Flex Carousel Strike Two: Externalized Position Managers

This idea is lifted directly from P.J. Onori (a.k.a. SOME RANDOM DUDE)'S Actionscript 3 Layout Organizers: externalizing layout managers for calculating positions of component elements. In this case used on a position-based flex carousel. The code for the managers I did have to do from scratch to leverage an older carousel I'd done before.

Check out the new version by clicking here. You can change manager and carousel properties in "real-time" and watch the carousel re-organize.

The idea is simple: define an IPositionManager interface that will be expected on the Carousel class. We can then build external position managers that can do whatever they need to store or calculate the carousel positions.

The most basic would be a position manager with explicitly defined positions . But we can also have managers programatically determine what the positions should be.

For this example, I've cooked a position manager for classic elliptical carousels, a grid carousel manager or a fancier Bézier curve based manager (this one thanks to Drew Cummins an his special Bezier classes which he lent us for this! :-)

Check out the carousel component by clicking here. On the carouselClasses package you'll find the layout managers. For the test mxml (which is long and messy, but shows some of the options you can play with) click here.

06/06/2008 15:22:00