You need to upgrade your Flash player (v.9 or later) to view this tutorial.
In Flash, the movie clip symbol is a movie within the movie. The Flash file has a Timeline, and each movie clip symbol has an independent Timeline inside. Thus the motion you see within a movie clip on the Stage occurs without any motion tween for it in the main movie Timeline.
If you open the FLAs for either of the two Flash movies appearing on this page, you will see only ONE motion tween on the main Timeline -- the tween for the sailboat.
Above, the Stop and Play buttons call functions that contain the basic ActionScript commands stop(); and play(); -- and the sailboat, in a motion tween on the main Timeline, responds to these as you might expect. The clouds, however, are inside a movie clip. Commands to the main Timeline have no effect on the Timeline of the movie clip.
Below, two additional buttons have been added. They stop and play the Timeline of the movie clip (clouds_mc).
Please note that a movie clip on the Stage must have an instance name (such as clouds_mc) assigned to it before it can be controlled with ActionScript. In my AS3 buttons tutorial, I explained how to assign an instance name to a button in Flash CS4. Assigning an instance name to a movie clip is the same.
More information about controlling movie clips is available here: Controlling Movie Clip Properties with ActionScript 3.0.
You need to upgrade your Flash player (v.9 or later) to view this tutorial.
DOWNLOAD (1) The FLA with two buttons (68 KB). (2) The FLA with four buttons (72 KB). Adobe Flash CS4 required. The FLAs contain all the ActionScript, on frame 1. I suggest that you compare the two files side by side so that you understand the differences between them.
Education use: This package was created as an example for my journalism students. It is not intended to be used commercially.
Use and re-use:
Flash CS4 and Movie Clip Control by Mindy McAdams is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Updated 28 February 2010