Flex 4 Gumbo Custom Spark Layout: Animated Paged Layout

September 17th, 2009 · 2 Comments

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.

Get Adobe Flash player

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.

Tags: ActionScript · Flash · Flash Builder 4 · Flex · Flex 4 Framework · Gumbo

2 responses so far ↓

  • 1 Evtim // Oct 11, 2009 at 3:01 pm

    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

  • 2 Adam // Oct 11, 2009 at 3:08 pm

    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!

Leave a Comment

*
To prove you're a person (not a spam script), type the answer to the math equation shown in the picture. Click on the picture to hear an audio file of the equation.
Click to hear an audio file of the anti-spam equation