Using the TransitionManager class in Flash CS3 and ActionScript 3

Many people have asked about integrating "PowerPoint" transitions into Flash movie. This idea is especially appealing when there should be some interplay between static content and interactivity within the same application. For example, in an educational setting there might be a slideshow conveying some information with every few slides having an interactive component.

For this purpose, Flash CS3 has the TransitionManager class available, but this class appears to be severely underdocumented by Adobe. The first example in this tutorial shows the basics of transitions. The second example discusses the events "allTransitionsInDone" and "allTransitionsOutDone" that are omitted from the Adobe Flash CS3 documentation. These events allow you to have subsequent behavior of your application wait until a transition has been completed. In the second example we add this feature to first example so that you can see the difference.

The third example combines our new understanding of transitions with the functionality of our custom ImageLoader class (discussed in the tutorial Loading Images and Spinning Them in 3D in Terms of AS3 Custom Classes in the Bridging the Gap section of this site) to build a "SlideShow" application that uses external image files and an xml file to convey information about file names and display modes.

Download

Download all four fla files for this tutorial in the following compressed folder.

Notes

All of our examples require the following two import statements. These will allow us to create all types of TransitionManager types in our script and allow them use fancy easing functions for starting and/or stopping.

import fl.transitions.*;

import fl.transitions.easing.*;

The Flash CS3 help files on "TransitionManager class" package will provide more complete information on the class methods and properties as well as on more options for easing functions to create simple simple transitions within your Actionscript code.

Back to Basic Tutorials              Back to Flash and Math Home

We welcome your comments, suggestions, and contributions. Click the Contact Us link below and email one of us.

Adobe®, Flash®, ActionScript®, Flex® are registered trademarks of Adobe Systems Incorporated.