Movie Clips
MovieClip merely adds the timeline capability to the Sprite class, and are reusable pieces of flash animation - consisting of one or more graphic/button symbols - thus they are flash movies within your flash movie. They have their own non-restricted Timeline (any number of layers and frames - just like the main timeline) that plays independent of the main movie's Timeline. The best thing about using movieclips is that you can control them from actionscript - you can change their dimensions, position, color, alpha, and other properties and can even duplicate and delete them.
Sprites
The Sprite class is new in ActionScript 3.0. It provides an alternative to the functionality of the MovieClip class. Sprites and Movie Clips are virtually identical in what they can hold and what they can do. Sprite is a type of DisplayObject and it is the class that MovieClip directly extends from, (so all MovieClips are Sprites). Use Sprites when you want to draw shapes with ActionScript. Sprites are generally the display object to use as they are highly functional and take little memory. Sprites do not have timelines so if you would like to create an animation contained within the display object, a Movie Clip is the display object to use.
No comments:
Post a Comment