The different type of Movie Clip symbols in Adobe Flash
Types of Movie Clips
When you create a movie clip instance by using Insert:Convert to Symbol or Insert:Create new Symbol, you can choose between one of three types of symbols. A movie clip, a button or a graphic.
Graphics are the most basic of all three types of symbols. Unfortunately, Flash ignores sounds or actions placed inside graphic symbols.
Unlike a movie clip, the timeline of a graphic symbol is played through only once, but only for the amount of frames that the graphic symbol exists in the timeline in which it was placed.
In other words, if you create a graphic symbol with ten frames and place that symbol on the main timeline. If the main timeline is only three frames long, the graphic symbol's animation will only play for three frames—whereas, if you had used a movie clip symbol, the animation would keep on playing forever.
Creating movie clips instead of graphic symbols does not significantly affect the file size of your .swf, so there is really no reason to use graphic symbols.
Movie clips are the most versatile type of symbol. They can behave as graphics or buttons. They have their own timeline with their own coordinate system as well as their own set of variables and properties.
Unlike graphic symbols, you can use ActionScript to control movie clips. Any actionscript attached to a movie clip should be placed in an event handler. In the example below, the ball will move by one pixel to the right everytime Flash enters a new frame (an enterFrame event doesn't really refer to the Flash timeline. Flash keeps an internal timer that registers a new frame every so often depending on what the movie's framerate is (which you can get to by using the the MODIFY:DOCUMENT menu)
Keep in mind that unless you place a stop action on a movie clip's timeline, any movie clip will automatically play over and over. This can work to an advantage when you wnat to create an animation look that repeats over and over. Movie clips can also be placed inside other movie clips for additional effects.
In addition to onClipEvent handlers, you can use button-like
on handlers when working with movie clips. However, when you use variables inside a movie clip's
on handler it will look for those variables inside the movie clip's timeline instead of in the parent timeline. This can create some confusion when using movie clips as buttons.
Buttons behave like a special kind of movie clip. They have a special timeline with only four keyframes.
You can script buttons with ActionScript, but only using
on event handlers.