Update: For the final version of the PagedLayout source, please visit Part 3.
Yesterday I posted my first attempt at a custom Spark Layout, PagedLayout. Using the GreenSock TweenLite libraries I added animation to the transitions of pages. I will go into detail on the changes made to the original class at some point, but today I only have time to post the project and my source. I have also created a an example application using Flickr’s RSS feed that I will post tomorrow.
View the Project in Action
Explore the Source Code
You may notice I didn’t go through and remove unnecessary parts of the tweening libraries, that’s something I’ll do later on as well.
Also, there are bugs in Flash Builder 4 (Gumbo) that prevent leading [‘s (in cases like [Bindable]) from showing up in the exported source. Make sure you download the zip file if you plan on using this code, not copying and pasting from the web.
Hey Adam,
this looks great! I think for what you’re doing toggling the visibility from within the layout is the right approach.
Have you thought about adding a measure() method so the container can auto-size perhaps to a single page?
Evtim
I think the measure() idea is a good one, when I go back through and clean up everything I will certainly add that. Thanks for the positive feedback!