#31 Setting the Frame Rate
Every Flash movie has a frame rate, a measurement of how quickly the playhead moves through the Timeline. Frame rates are expressed in frames per second, usually abbreviated as fps. Flash permits frame rates ranging from 120 fps (the fastest) to 0.01 fps (the slowest), which is equivalent to 100 seconds per frame. For comparison, the standard frame rate for a theatrical film is 24 fps.
A movie's frame rate is displayed on the horizontal strip at the bottom of the Timeline (Figure 31a). The default frame rate is 12 fps, but you can change it by double-clicking the frame-rate display or by choosing Modify > Document.
Figure 31a The frame rate of your movie is displayed here.
The smoothness of animation increases as the frame rate increases. For example, let's say the process of opening a door takes 1 second. You might animate the door opening in 10 frames at 10 fps, or you might animate it in 30 frames at 30 fps. Both animations would have a duration of 1 second, but the latter would be much smoother, because there would be less movement in each frame (Figure 31b).
Figure 31b If both of these sequences are played in the same amount of time, the bottom one will have a higher frame rate and thus will look smoother. If both sequences are played at the same frame rate, they'll look equally smooth, but the bottom one will have a longer duration.
A higher frame rate requires a larger SWF file (since more information has to be stored in the file), and it also puts more of a demand on the computer's processor. You'll often want to use a lower frame rate to gain efficiency at the expense of smoothness. If you're doing frame-by-frame animation (see #32), a lower frame rate also requires less work from you.
Keep in mind that the frame rate you set for a movie is only a target. For example, it's unlikely that a typical computer can play a movie at 120 fps. The lower you set the frame rate, the more likely it is that any given user will be able to see the movie as you intended. A frame rate of 12 fps is generally considered the minimum for acceptably smooth motion; most animation on the Web has a frame rate of about 15 fps.
When you set a frame rate, you set it for the entire movie; if you change it, you change it for the entire movie. You can't start a movie with one frame rate and end it with another—at least not without some tricky ActionScript. If you want to slow down a particular sequence in your movie, the optimal solution isn't to lower the frame rate, but to add more frames to the sequence.