Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Working with Symbols

Working with Symbols

Symbols are the very essence of what makes Flash … well, Flash. You can make anything you draw or import into a symbol. And in almost all cases you should. Here’s why. When an object is converted into a symbol, it automatically becomes an item in the Flash document’s library. Every Flash document has its own library from which you can drag a symbol to the Stage. When you do, the object on the Stage is now referred to as an instance. No matter how many instances of a symbol reside on the Stage, Flash only needs to load it once. This is how Flash delivers streaming animations while maintaining small file sizes. It’s extremely efficient to reuse symbols as many times as possible. You can also apply effects to instances such as Scale, Tint, Alpha, and Brightness, and apply motion tweens in combination with one or more effects.

However, before I get too far ahead of myself, I’ll introduce you to symbols and their behaviors.

Create an object—anything, a simple shape will do. Select it (Ctrl+A) and then convert it to a symbol by choosing Modify > Convert to Symbol or pressing the F8 key. This opens the Convert to Symbol dialog box (see Figure 20).

Convert to Symbol dialog box

Figure 20. Convert to Symbol dialog box

In the Convert to Symbol dialog box you can type a name for your symbol, select one of three behaviors, and determine the registration point of your object. The following list explains what each behavior is and what it means:

  • Movie clip: Movie clips are dynamic, which means they can be targeted with ActionScript, the Flash programming language. They can have any number of layers and frames, but their timelines are independent of all other timelines. Think of a solar system: Each planet is a movie clip, looping endlessly and independently around a sun, which is your main Timeline.
  • Button: Buttons have four states: Over, Up, Down, and Hit. These are represented as keyframes in a button symbol. 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 very similar to movie clips with the exception that they are not dynamic and cannot be targeted with ActionScript. However, you can place a graphic symbol inside a movie clip symbol. Graphic symbols can have any number of frames and layers. The most important feature is that they will always be in sync with the main Timeline and each other. This is very important when trying to create time-based animations.

In this animation tutorial, I recommend using the Graphic behavior. This enables you to scrub the Timeline to see your animation play while inside the Flash authoring environment. Scrubbing refers to moving the playhead back and forth manually to play back the contents of the Timeline. Movie clip symbols do not play beyond Frame 1 of their contents unless you test your Flash movie (Ctrl+Enter) or export your movie as a SWF file.

Comments