Working with Symbols

Working with Symbols

Symbols are the building blocks of Flash. You can convert anything you draw or import into a symbol, and there’s a good reason to do so: When an object is converted into a symbol, it automatically becomes an item in the Flash doc- ument’s Library. Every Flash document has its own Library from which you can drag a symbol onto the Stage. When you do so, the object on the Stage is referred to as an instance. No matter how many instances of a symbol reside on the Stage, Flash only needs to load the source symbol once. This is how Flash delivers smoothly streaming anima- tions while maintaining small file sizes. It’s extremely effi- cient to reuse symbols as many times as possible. You can also apply effects such as Scale, Tint, Alpha, and Brightness to instances and apply Motion Tweens in combination with one or more effects without increasing file size.

When you convert artwork to a symbol, you have a choice of three possible symbol behaviors:

. Movie Clip. Movie Clips are dynamic, which means they can be targeted with ActionScript, the Flash program- ming language. They can have any number of layers

and frames, but their Timelines are independent of all If you are authoring content for video output, see the “Publishing

other Timelines. Movie Clips can have Blend Modes for Broadcast” section in Chapter 5 and Filters applied to them to achieve sophisticated

for more details.

effects. You will utilize Movie Clips in Chapters 3 and 5 to create custom effects and behaviors. Movie

The act of manually moving the Clips can also be created dynamically at runtime and

playhead back and forth on the can also act as a container for other objects, such as

Timeline is called scrubbing. external images. . Button. Buttons have four states: Over, Up, Down, and

Hit. These are represented as keyframes in a button symbol’s Timeline. You can place graphics in any of these states and then apply ActionScript to the instance of a button to add interactivity to your Flash movie.

. Graphic. Graphic symbols are similar to Movie Clips except that they are not dynamic and cannot be targeted with ActionScript. Like Movie Clips, Graphic symbols can have any number of frames and layers. Graphics are useful, because their Timelines can be

Animation with Scripting for Adobe Flash Professional CS5 Studio Techniques

manipulated via the Properties panel. The most impor- tant feature of Graphic symbols is that they will always

be in sync with parent (Graphic) Timelines and the main Timeline. This feature becomes crucial when you are creating frame-based animations, which is why most animators use Graphic symbols for fixed-frame output formats (such as video). Unlike animation within Movie Clip Timelines, animation nested inside Graphic sym- bols can be seen when the playhead is moved back and forth along the Timeline within the Flash authoring environment. The only drawback to Graphic symbols is that they do not support Blend Modes or Filters.

In this chapter, you will focus primarily on building a char- acter using Graphic symbols. You will apply a technique known as nesting to easily manipulate the character on the Timeline.