O'Reilly logo

Learning ActionScript 3.0 by Zevan Rosser, Rich Shupe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. TIMELINE CONTROL

In this chapter, you'll learn some basic approaches to controlling timelines—both that of the main Flash movie and movie clips therein. We'll divide our focus into three main areas:

  • Playhead Movement. Such as stopping and playing the file, and going to a specific frame.

  • Frame Labels. Including improved playhead movement techniques without relying on frame numbers.

  • Frame Rates. Changing the movie's frame rate, to increase or decrease animation speed during playback.

We'll also take a look at an undocumented feature that allows you to add frame scripts to movie clips at runtime. We'll lay some groundwork for our ongoing project and show you a demo on how to create a flexible structure for a Flash web site or application that will later evolve into our AS3 Lab interface.

Playhead Movement

One of the most basic ActionScript skills you need to embrace is the ability to navigate within your Flash movies. You will often use these skills to control the playback of movie clips nested within your main movies.

The code in this chapter is straightforward enough that you can create your own files to test the functionality. We'll cover the structural necessities for each file to make it easier for you to follow along using your own assets. In each section, we'll also cite the sample file we're using so you can consult that file if you prefer.

Let's start by covering the basic concept of stopping and starting playback of a movie or movie clip, and then add an initial jump to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required