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 ...
Get Learning ActionScript 3.0 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.