Go to a Specific Frame on Main Timeline

Go to a Specific Frame on Main Timeline

Flash CS4 ActionScript 3.0 Tutorial

How to Control the Main Timeline with a Button on the Main Flash Stage

Main timeline control can come from a button on the main stage, a button in a nested movie or a button in an external swf file. In this example we have a button located on the main stage that controls the playhead of the main timeline.

Tutorial Elements

Button Symbol with instance name mainButton_btn

Step One

Open a new Flash document and name the default layer Content.

Step Two

Add a new top layer and name it Actions.

Step Three

Click frame one of the Content layer and draw an oval shape with the Oval tool.

Step Four

Click the oval and press F8 to convert it to a Button Symbol.

Step Five

Name the button, MainButton and choose Button for type.

Step Six

Double-click the oval object to open the edit mode. Press F6 three times to copy/paste the Up content to the Over, Down and Hit keyframes.

Step Seven

Click the Scene icon to return to the main timeline.

Step Eight

Click the button and give it an instance name of mainButton_btn in the Properties panel.

Step Nine

Click frame two of the Content layer and add a blank keyframe by pressing F7.

Step Ten

Using the Text tool, add the following Static text (Frame Two) to frame two of the Content layer.