Archive | How-to RSS feed for this section

Video tutorial: “Elf Yourself” yourself – Personalized video on the web


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 video on the web? Want to create your own ElfYourself.com? This tutorial shows you how it’s done using After Effects CS4 and Flash Professional CS4. Ooh.. before I forget… One of my evangelist colleagues has a cameo appearance at the end of the tutorial ;-)

Read full storyComments { 28 }

Reducing CPU usage in Adobe AIR

jonnie_hallmanJonnie Hallman from DestroyTwitter fame and recently employed by the Adobe XD team, wrote a great article about how he reduced CPU usage in his AIR application.

“AIR gets a bad rap for being a bloated runtime, using up a lot of precious memory and CPU. Although a lot of AIR applications seem to fall into this trap, it doesn’t have to be this way. There are a number of techniques you can use to develop a lightweight application that rivals native programs in terms of performance,” he says.

The article explains what framerate throttling is and how best to implement it in your application.

Read full storyComments { 13 }

Tutorial: Sexy transitions with Flex 3 (as used in the MAX widget)

When I showed the first versions of the MAX widget to a few colleagues, most were very surprised to hear that this was all built with the Flex 3 framework and that no Flash Catalyst or Flash CS4 was involved in this.

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.

[flash medium=5 w=400 h=400 mode=1]

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.

download_manager_72x72

Download the source.

Read full storyComments { 14 }

Building CPU efficient Adobe AIR apps

One of the biggest complaints we hear a lot about AIR applications is that they use too much memory and/or too much CPU. Sure… Adobe needs to (and will) make investments in improving the performance of AIR and Flash Player but you as a developer can already make some improvements to your app as well. I know this has been discussed before but repetition never hurt anyone. ;-) If you’re having issues with the app that you are building, you should definitely check out Arno’s blog post about this very topic.

With just 4 simple tips, you can dramatically improve the memory/CPU usage footprint of your application.

  1. Use the lowest framerate possible
  2. Dynamically change the framerate to fit your application needs
  3. Only use Event.ENTER_FRAME handlers when necessary
  4. Have as few Event.ENTER_FRAME handlers and Timers as possible

Check out Arno’s blog for more info on how to implement these tips. The AIR team also has a blog post about this topic.

If you have any other tips that you are currently using, please feel free to leave a comment. Also, if you have any questions regarding this topic, please feel free to get in touch.

Read full storyComments { 11 }

Need help switching to AS3.0? Check out the Migration Cookbook

A lot of Flash developers are still using ActionScript 2.0 to code their Flash based projects and there’s nothing wrong with that. However, ActionScript 3.0 gives you lots of benefits. For instance, the performance of ActionScript 3.0 based applications is far greater than AS2.0 based apps and you also get a ton of new Flash Player APIs and community libraries.

Today, we launched a new ActionScript technology center on the Devnet site with links to a variety of resources and tutorials. The Migration Cookbook is a good place to start. There’s also a downloadable PDF version that will get you up to speed with ActionScript 3.0 in no time.

Flash on!

Read full storyComments { 5 }

Video tutorial: Use Flex for your ActionScript coding for Flash CS4

There are a couple of ways you can use Flex and Flash together. I’ve already showed you a couple of those in previous tutorials. In this video, I’ll show you how to use the SWC files created by a Flex library project in Flash CS4. That way, you can have an ActionScript developer work in Flex who can then hand off compiled SWC files to a Flash designer.

Read full storyComments { 19 }

Video tutorial: Use the Flex webservice component in Flash CS4 projects

In this video, I’ll show you how you can use the webservice component from the Flex framework in your Flash CS4 projects. If you’re missing the webservice component in Flash, just use the one in the Flex framework.

UPDATE: My sincere apologies. There is an error in my code which I did not explain in the video.
Line 10 should not read myWebService.load but myWebService.loadWSDL.

I do remember we recorded this one twice and I fear that that’s where the mixup happened. Please download the working FLA below.

Download the FLA file.

Read full storyComments { 12 }

Video tutorial: Introduction to Adobe’s mobile platform

Adobe’s mobile platform has become a lot more interesting for Flash developers this week. Instead of having to open up the Flash Player on your device to watch the Flash content you created, you can now package your application using the Mobile Packager and distribute your application as an SIS-file for Symbian S60 or CAB-file for Window Mobile phones. Your users can now download and install your Flash based application on their mobile device just like any other application they install. What’s even cooler is that we also package a Flash Version Checker together with your application. As soon as the user launches the application, the Flash Version Checker is going to check if the Flash Player is installed and if it is the correct version. If not, it’s going to download and install the Flash Lite runtime seamlessly. Exactly like you would do on a PC and exactly as it should be. Check out Andrew Shorten’s blog post on the installation process.

I’ve recorded a little video that walks you through the process and will be doing more videos on how to build mobile applications soon.

Read full storyComments { 32 }

Video tutorial: Create Flex container components with Flash CS4

In this video I show you how to make a Flex container component with Flash CS4 and the Flex Component Kit for Flash.

The Flex Component Kit for Flash is incredibly powerful and allows you to combine your Flash design/development skills with the power of the Flex framework.

Subscribe to the Adobe Developer Connection videos on iTunes.

Read full storyComments { 13 }

How to use the new Text Layout Framework

tlfMy colleague Mihai Corlan just published an excellent article on how to use the new Text Layout Framework. 

The Text Layout Framework (released on Labs) is an extensible library, built on the new text engine in Adobe Flash Player 10 (and also available in AIR 1.5), which delivers advanced, easy-to-integrate typographic and text layout features for rich, sophisticated and innovative typography on the web.

Go check it out on Mihai’s blog.

Read full storyComments { 0 }
Page 1 of 3123