Tutorial: Sexy transitions with Flex 3 (as used in the MAX widget)
“Including the animations?“, was a question I got a lot. And yes… Even the animations are “programmed” using the Flex framework. And you know what… It’s really not as hard as it sounds. The Flex framework actually has a bunch of effects built in and they are really easy to use.
In this case, I used 2 move effects and specified a “Back.easeOut” easingFunction. This easing function creates that bouncing effect that you see in the widget.
<mx:Move id="moveIn" yFrom="400" duration="350" easingFunction="Back.easeOut"/> <mx:Move id="moveOut" yTo="400" duration="250" easingFunction="Back.easeIn"/>
You can use these types of effects in a number of different ways but the easiest way (I think) is to specify the showEffect and hideEffect on a component.
<mx:Canvas id="page1_back" showEffect="moveIn" hideEffect="moveOut" width="400" height="400"/>
When you set the visible property to false, the hideEffect will trigger and the showEffect gets triggered when you set the visible property to true. I’m sure you can already see how I built this ;-)
In the widget, you see 6 different pieces of graphics slide in to place over time. To do that, I created a timer that triggers my setup function over time.
var setupTimer:Timer = new Timer(150, 3);
setupTimer.addEventListener("timer", doSetupPage1);
setupTimer.start();
This timer will trigger the doSetupPage1 function 3 times with 150 milliseconds in between each call. All my doSetupPage1 function does, is set the visible property to true on the different pieces of graphics I want to show.
private function doSetupPage1(event:TimerEvent):void
{
switch (event.target.currentCount)
{
case 1:
page1_back.visible = true;
break;
case 2:
page1_middle.visible = true;
break
case 3:
page1_front.visible = true;
break;
}
}
To hide them, I’m actually doing exactly the same thing. Instead of setting the visible property to true, I set it to false and when all pieces of artwork are hidden, I trigger the function that reveals the next page.
(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)
To get you started, I created this little Flex project that demonstrates this approach. Now I’m not saying that this is best practice or not but I think it’s just an easy way to create sexy transitions with Flex 3.
No trackbacks yet.
Video tutorial: “Elf Yourself” yourself – Personalized video on the web
November 13, 2009 - 4:43 pm
Tags: after effects, elfyourself, Flash, How-to, personalized video, tutorial
Posted in How-to, Video Tutorial | 17 comments
Note: Please update your After Effects CS4 installation to make sure you have the latest version available via the Adobe Updater. There is an issue with the preinstalled After Effects script that requires you to work with the latest point release (separate downloads available for Mac OS and Windows).
Ever wondered how you can create personalized [...]
Recently purchased CS4? Get Flex Builder 3 Standard for free!
October 20, 2009 - 10:10 am
Tags: creative suite, cs4, flex builder, free
Posted in News, adobe | No comments
Did you purchase CS4 Web Premium or CS4 Master Collection on or after September 15, 2009? Then get your free copy of Flex Builder 3 Standard today!
Check out https://freeriatools.adobe.com/cs for more info.
I would also like to remind you that Flex Builder 3 is also/still free for education and unemployed developers. Additionally ColdFusion is also free [...]
10 leading CEOs discuss the Open Screen Project and Flash
October 6, 2009 - 2:28 pm
Tags: adobemax, ARM, broadcom, DoCoMo, google, htc, max, MAX2009, Motorola, nvidia, open screen project, palm, QUALCOMM, RIM
Posted in open screen project | No comments
CEOs from ARM, Broadcom, DoCoMo, Google, HTC, Motorola, NVIDIA, Palm, QUALCOMM, and RIM talk about how they’re bringing Flash Platform technologies to their devices and platforms as part of the Open Screen Project and why they think it’s important to have Flash on their devices and platforms.
Doug Winnie: “It’s really big”
October 3, 2009 - 7:32 pm
Tags: adobemax, behind the scenes, los angeles, MAX2009, nokia theater
Posted in MAX2009 | No comments
I completely agree ;-)
Adobe MAX social media & DeadDrop challenge
October 2, 2009 - 5:38 am
Tags: adobemax, flickr, live, los angeles, max, MAX2009, resources, social media, twitter
Posted in MAX2009 | 1 comment
I’m sure that by now you will have noticed that Adobe MAX is literally just around the corner. The pre-conference show starts this weekend and the countdown has started to Monday’s first keynote. I have managed to sneak in to some rehearsals this week in the San Francisco office and I was absolutely speechless when [...]
My sessions at Adobe MAX
I was just putting my MAX sessions in my calendar and realized that I didn’t blog about these yet… Major oooops :D So… Let me rectify that by listing my sessions below.
If I’m not in a session or rehearsal, chances are that you can find me in the community lounge or at the Adobe booth. [...]
Distribute, promote, track and monetize apps like the MAX widget
September 21, 2009 - 7:26 am
Tags: distribute, gigya, maxwidget, monetize, promote, track, widget
Posted in Flash Platform, adobe | No comments
If you’ve installed the MAX widget you may have noticed that I used the Gigya service to enable this feature. We actually teamed up with Gigya and are now launching the Distribution service.
This new service enables users to instantly add your application to their own page or account on more than 70 social networks and [...]
Behind the scenes of the MAX widget – ColdFusion, FMS and Flex
September 15, 2009 - 2:11 pm
Tags: adobemax, max, MAX2009, maxwidget, widget
Posted in ColdFusion, Flex, MAX2009, projects | 2 comments
While I was taking some time off, I thought it would be a good idea to give you a peak at what’s running behind the scenes of the MAX widget and why I chose ColdFusion and Flex to build it.
Why ColdFusion?
There are a number of reasons why I chose ColdFusion but the main reason is [...]
Project Quindici = MAXwidget
August 21, 2009 - 4:50 pm
Tags: adobe max, MAX2009, maxwidget, project quindici, quindici
Posted in MAX2009 | 8 comments
If you’re following me on Twitter, you may have seen me Tweet about Project Quindici. Quindici is Italian for 15. Project Quindici is actually a widget that (among other things) allows you to record your own testimonial and thus claim your 15 minutes of fame.
I’m happy to announce that the project is now live. The [...]







August 28, 2009 - 12:15 pm
Nice tutorial!
One more reason why effect triggers should find it`s way back into Flex 4 :-(
August 28, 2009 - 12:46 pm
It was really easy in Flex but getting the right pictures piece together is a challenge.
August 28, 2009 - 10:15 pm
Most people don’t realize that an interesting easing function, and some appropriate timing delays, can make for a very compelling experience. Thanks for sharing. We can all use some inspiration as Flex developers, even if it’s such a simple thing.