![]() ![]() |
|
You only can put commands (called "actions") in keyframes, so if you want to execute a command beyond frame 1, you need to make a blank keyframe for it. For example, let's make a command occur at frame 12 (half a second into the movie, if the frame rate is 24 fps). We insert the blank keyframe, then select the box:

Now we open the Actions panel (Window > Actions, for Flash Standard, Window > Development Panels > Actions for Flash Professional). The Actions panel lets us type commands into that keyframe.
The first action we will learn is the "stop" action. This tells Flash to stop advancing the Timeline (halt the playhead). Not particularly exciting, but very important. We might use stop if we wanted to have some animation go on for a while, then stop the action. In the Actions panel, type the words: "stop();"

Important: Notice that when you have actions in a keyframe, Flash reminds you of this fact by placing an "a" in the keyframe box.
The second command we will learn is the output command (called trace). This is used only during movie development, not once you distribute your movies. In the same keyframe as your stop command, type the following text before the stop command: trace("Hello");

The trace command prints out a message to the Output window when the movie is running inside Flash. You can test your movie (Control > Test Movie) to see that when the playhead reaches that frame, the Output window will appear and Flash will print out that message. If you do not have the stop command, your timeline will repeat when the playhead reaches the end, and you'll get the message again each time the playhead passes that keyframe.
If you made a mistake in typing, when you go to test the movie (Control > Test Movie), Flash will come up with the Output panel and tell you the problem, for example:

Go back and fix it before continuing. If all is well, you will get the following printed in the Output window when you test the movie:

Let's now learn some CS Effects commands!
![]() ![]() |
|