- Controlling the Timeline
- Basic Timeline Stop and Play Scripts
- Navigating to Specific Frames
Navigating to Specific Frames
One last indispensable script at this point in your ActionScript skill set are button or frame scripts to move the playback head to a specific frame or frame label, as shown in figure 11.
Figure 11 This button script uses the goto action and the frame number parameter to move the playback head to frame 1 of the Timeline
Notice that the script in Figure 11 uses the exact same event handler (on (release) { ) for the GO HOME button that triggers the action. In this case, you employ the goto action, which has several options (parameters) for moving the playback head. You can direct the playback head to a frame number (default) or a frame label (better).
After mastering these basic but "must-know" scripts for controlling the main Timeline, you are now ready to start writing scripts for controlling the independent timelines of movie scripts and external SWF files, which is the topic of the next article in this series.
For more information on these types of timeline scripts, view the relevant Flash tutorials on my web site.