User Guide

54 Chapter 3: Using Symbols, Instances, and Library Assets
If you import library assets that have the same name as assets already in the library, you can
resolve naming conflicts without accidentally overwriting existing assets. See “Resolving conflicts
between library assets” on page 72.
For an introduction to using symbols and instances, select Help > How Do I > Quick Tasks >
Create Symbols and Instances.
This chapter contains the following sections:
Types of symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
About controlling instances and symbols with ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Creating symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Creating instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Creating buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Enabling, editing, and testing buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Editing symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Changing instance properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Controlling instances with behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Breaking apart instances. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Getting information about instances on the Stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Copying library assets between documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Using shared library assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Resolving conflicts between library assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Types of symbols
Each symbol has a unique Timeline and Stage, complete with layers. When you create a symbol
you choose the symbol type, depending on how you want to use the symbol in your document.
Use graphic symbols for static images and to create reusable pieces of animation that are tied to
the main Timeline. Graphic symbols operate in sync with the main Timeline. Interactive
controls and sounds wont work in a graphic symbol’s animation sequence.
Use button symbols to create interactive buttons that respond to mouse clicks, rollovers, or
other actions. You define the graphics associated with various button states, and then assign
actions to a button instance. For more information, see Chapter 5, “Handling Events” in Using
ActionScript in Flash.
Use movie clip symbols to create reusable pieces of animation. Movie clips have their own
multiframe Timeline that is independent from the main Timeline—think of them as nested
inside a main Timeline that can contain interactive controls, sounds, and even other movie clip
instances. You can also place movie clip instances inside the Timeline of a button symbol to
create animated buttons.