4.7. Previewing Playback

Problem

You want to view the animations you’ve created.

Solution

Drag the playhead, choose Control → Play, or export the .swf file by choosing Control → Test Movie.

Discussion

You can play back your animations in two ways in Flash, each with its own advantages and disadvantages:

Authoring environment

You can view an animation right in the Flash authoring environment. This is the most convenient way to preview an animation, but also the most limited, because it ignores most ActionScript and is incapable of displaying nested animations.

Creating a .swf file

Exporting a SWFis the most reliable way to preview an animation, because it lets you see exactly what a user will see—ActionScript and nested animations included. The file opens in a new window, which you then need to close or hide before returning to the main authoring environment.

Which approach you use depends on what you need to preview. If all you need to preview is a tween or a frame-by-frame animation, the authoring environment is sufficient and more convenient. If you need to view any more than that, you’ll probably need to export the .swf file.

To view an animation in the authoring environment, do one of the following:

  • Drag the playhead back and forth on the main timeline.

  • Choose Control → Play, or press the Enter (Windows) or Return (Macintosh) key to start and stop playback. The animation is played back at the document frame rate.

  • Step backward or forward one frame at a time by choosing Control → Step Forward or Control → Step Backward. The keyboard shortcuts for these are period (.) and comma (,), respectively. Holding down the period or comma key plays the timeline very quickly—at about 25 frames per second, regardless of the document frame rate.

  • Skip to the beginning (Control → Rewind) or the end (Control → Go To End).

To view the animation in the SWF, choose Control → Test Movie, or use the keyboard shortcut Ctrl-Enter (Windows) or Command-Return (Macintosh). When you are finished, close the SWF to return to your document.

Get Flash 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.