To perform a number of tasks , Macromedia Flash depends on the usage and instance of symbols. Symbols are reusable elements that you use throughout your Flash documents. Once you create a symbol, which can be anything from text to a sound file, it is automatically tracked in the Library. Each symbol has its own timeline and layers associated with it. There are three types of symbol behaviors: graphics, movie clips, and buttons . Types of Symbol BehaviorsA graphic symbol is usually a static image that is incorporated into the main Timeline. Interactive controls and sounds don't work within a graphic symbol's animation sequence. A movie clip symbol is usually an animation sequence that has its own timeline and works independently of the main Timeline. Interactive controls and sounds do work within a movie clip symbol's animation sequence. A movie clip can contain another movie clip, graphic, or button. You can even place an instance of a movie clip within a button for an animated sequence within your button. ActionScript can also speak to or affect instances of movie clips. NOTE The animation and scripts created within a movie clip cannot be seen within the Flash MX authoring environment. To see the effects of your movie clips, you have to view them in the Flash Player. A button symbol is used toyou guessed itcreate buttons. These buttons allow for interactivity within your Flash document. Its timeline consists of four states: up, over, down, and hit. All the functionality and attributes of buttons are covered in greater detail in Chapter 7, "Buttons." Creating and Editing SymbolsYou can create symbols in Flash either by converting an existing object on the stage to a symbol or by creating an empty symbol and designing the symbol within its symbol-editing mode. To convert an existing element on the stage into a symbol, select the object on the stage. Then either select Insert, Convert to Symbol from the top menu bar, or right-click (Windows) or Control-click (Macintosh) and toggle down to Convert to Symbol from the pop-up menu. Once you do that, the Convert to Symbol dialog box appears. Within this dialog box you can specify a name , a behavior, and the registration point of the symbol. Once you click OK, the symbol is automatically loaded into your Library. All editing to this symbol must thereafter be done in symbol-editing mode. Flash MX also allows you to simply drag content to the Library window to create a symbol. To create a new symbol, select Insert, New Symbol from the top menu bar. You will notice that the Create New Symbol dialog box appears. Within this dialog box, you can specify a name, a behavior, and the registration point of the symbol. Once you click OK, the symbol is automatically loaded into your Library. TIP Simply double-click a symbol to bring it into symbol-editing mode. To get back to your movie, select the original scene from the breadcrumb trail located to the top right of the stage. The LibraryAll the symbols and assets of a Flash document are found within its own Library. As discussed earlier, graphics, buttons, and movie clips are automatically housed here whenever you create a new symbol or convert objects to symbols. The Library window is one of the major components of the Flash interface (see Figure 3.2). Whenever a new Flash document is created, the Library is empty. You can open the Library window by selecting Window, Library from the top menu bar. If you want to use some assets or symbols from another Flash movie, simply select File, Open As Library from the top menu bar. Then you just click and drag the symbols you want to use into either the current movie's stage or its Library. Figure 3.2. The Library is where all symbols are stored.
The Library window has a list of symbols and assets currently being used in your movie. The Preview pane located at the top shows which symbol is selected. There are also four icons located along the bottom of the window, which, respectively, let you create a new symbol, create a new folder, change the properties, and delete items within the Library. Folders are used to manage and organize the elements within the Library. Each element has a unique icon displayed next to it. The Library window lets you expand and collapse the window. If you click the expand icon, you will see that you can view the symbol's property type or kind, and use count, linkage, and modification-date attributes of each asset within the Library. The drop-down menu offers many other options, which are listed in Table 3.1. Table 3.1. The Library's Menu Options
|