Types of Movie Clips
Not all movie clips are created equal. In fact, there are three distinct types of clips available in Flash:
Main movies
Regular movie clips
Smart Clips
In addition to these three official varieties, we may define four further subcategories, based on our use of regular movie clips:
Process clips
Script clips
Linked clips
Seed clips
While these latter unofficial categories are not formal terms used in ActionScript, they provide a useful way to think about programming with movie clips. Let’s take a closer look at each movie clip type.
Main Movies
The main movie of a Flash document contains the basic timeline and Stage present in every document. The main movie is the foundation for all the content in the document, including all other movie clips. We sometimes call the main movie the main timeline, the main movie timeline, the main Stage, or simply the root.
Main movies may be manipulated in much the same way as regular movie clips, however:
A main movie cannot be removed from a
.swf
file (although a.swf
file, itself, may be removed from the Flash Player).The following movie clip methods do not work when invoked on a main movie:
duplicateMovieClip( )
,removeMovieClip( )
,swapDepths( )
.Event handlers cannot be attached to a main movie.
Main movies can be referenced through the built-in, global
_root
and_level
n
properties.
Note that while each .swf
file contains only one
main movie, more than one .swf
may reside in the
Flash Player at once—we may load multiple
.swf
documents ...
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.