Creating A PLAY Button with ActionScript 2.0

Timeline Actions

Let's get your movie to STOP on the first frame. We are going to do this by putting some code on a keyFrame. First, create new layer at the very top and name it Actions. It's an important habit to get into right now: creating a unique layer just for actions:

Make certain you have the first frame of the new Actions layer selected on the timeline (like in the picture above), then bring up the ActionScript dialogue box (the keyboard shortcut is F9)

  1. Make certain the top left corner says Actions-Frame (select frame one on the timeline)
  2. Enable Script Assist (if it isn't already on)

Now add the code to stop the timeline on Frame 1:

  1. Click to expand Global Functions
  2. Click to expand Timeline Control
  3. Double-Click to add the stop action to the timeline. Script Assist will add the extra marks to make the code legitimate: stop();

If you test the movie now, it should stop on frame one - wow, you are a programmer! Have a look at the timeline again. The strange little a indicates there are actions "on" Frame 1: