Movie clips are symbols in Flash that act like mini-movies inside the main movie. They’re useful for animations that require repeated motion (such as a walk cycle), or when you want to place a single frame of a long animation within a larger one, and can be controlled via ActionScript.
Create a Movie Clip
To create a movie clip, you can use the Flash authoring tool or the Flash player, which runs on most Web browsers. The simplest way is to draw a simple shape such as a circle, select the drawing and press F8, then accept the default Movie Clip behavior in the Symbol Properties dialog.
You can also convert an entire frame-by-frame animation to a movie clip by nesting the frames into a graphic symbol container. However, this is not really recommended, since it makes the animation less ‘exportable’ in some ways and isn’t as easy to edit.
Creating a Movie Clip with Script
To use a movie clip in your script, you must first set it up correctly. That means making sure you have a Symbol in your library and that the _mc suffix is added to it (it’s always better to use the -mc or –mc commands instead of typing them in).
Then, add some code. This example will change the _xscale and _yscale properties of a circle Movie Clip instance to enlarge it by 10 percent when it is clicked. The code will also use the with() function to target the circle Movie Clip instance and add a nested group of actions that will animate the button’s movement.
Using Symbol Editing Mode
To enter Symbol Editing Mode, double-click an object on the Stage or in the Library. The Edit bar will indicate Scene 1 and the name of your movie clip (in this case, “kite_movie”).
Once you’re in Symbol Editing Mode, you can edit the movie clip as normal, or you can use a special tool to manipulate its timeline.
For example, to reposition the legs_mc movie clip in this exercise, drag it from its original location on the Stage to a new position on the timeline. In addition to repositioning the leg_mc symbol, you can resize it by selecting it with the Free Transform tool and changing its size or rotating it.
Adding Actions to a Movie Clip Instance
If you’ve ever created a movie clip instance and wanted to add more actions, such as a stop() command, you can do so quickly with the help of the Actions pane in the Script panel. Just type a period followed by the _mc suffix and a list of possible commands, methods, and properties will appear. You can then scroll through the list with the arrow keys, and click the appropriate command to include it in your script.
When you’re done, save your movie as a new.FLA file and test it on the Stage (Ctrl+Enter or Command+Enter). When you’re satisfied with the results, save the.FLA file and publish it to a Web site.