The Graphic Symbol

Graphic symbols are the first symbol we will discuss because it is the most basic. Things to note about Graphic symbols are that they have a synced timeline. This means that when a graphic is rendered on the main timeline, if the graphic has several frames of animation, it will play ahead only if the timeline it is residing on moves ahead as well. ActionScript (which is discussed later in this book) will not work within Graphic symbols either on their timeline or within them as Object Actions. Also, you cannot apply filters or blending options to graphics.


Although the timeline of a graphic is synced, you can control which frame to start on by selecting the graphic, going to the Properties Inspector, and adjusting the First: field, which defaults to 1.

When Should You Use a Graphic?

Going back to what we have already covered, when you draw on the stage, you are creating primitive objects that will have to be rendered at runtime by Flash. Even groups and Drawing Objects are just several shapes grouped together that will also have to be rendered at runtime.

In comes the Graphic symbol. Because shapes on the stage are rendered in each frame of the Flash player, sometimes they take up more resources and processor cycles than what are necessary. Using an instance of a graphic symbol, because it is a copy of a symbol in the library, will take up fewer resources because in each frame, the Flash player refers back to the original and makes the necessary changes.

Because of the inherent simple nature of Graphic symbols, they are best used for static imagery or simple animations. (Complex animations are usually more suited for the Movie Clip symbol, which is discussed later in this chapter.)

But enough about what Graphic symbols are; following is a step-by-step list showing how to create them:


Create a new Flash document by going to File, New (PCCtrl+N, MacOpen Apple+N), and choosing Flash Document.


Now choose Insert, New Symbol (PCCtrl+F8, MacOpen Apple+F8), which will bring up the Create New Symbol dialog box, as shown in Figure 5.1.

Figure 5.1. The Create New Symbol dialog box.


In this dialog box, you will choose several options concerning your symbol. If however, your dialog box does not look like Figure 5.1, click the Basic button. This will hide the other options that are discussed later in this book.


The first choice you will make is the name of your symbol. So name it squareG.


Although the symbol name is used only in the library and not used anywhere in ActionScript, it is still important to give it a name that somewhat describes what the symbol will be. In this walkthrough, we name it squareG because we will draw a square shape in it. Also, as a personal preference, I tend to put a capitol "G" at the end of graphics to symbolize that they are graphics, but it is not necessary to do so.


The next choice to make is the Behavior of the symbol, which in this case is Graphic. Choose that and click OK.


Notice that your screen has changed to Figure 5.2, a blank stage with a tiny crosshair in the center. Draw a square using the rectangle tool (R) so that it is roughly centered over the crosshair.

Figure 5.2. The empty graphic symbol before you draw anything in it.


Aligning shapes inside a symbol is more important than it may appear here. When you begin to work with symbols on the stage, you will see that rotation and certain sizing techniques depend on the center of the symbol, so keep it in mind. But don't worry if you put shapes in the wrong place at first because you can always edit the symbol and change it later.


After the square is drawn, go back to the main timeline by clicking Scene 1 at the top left of the timeline.


On returning to the main timeline, you will notice that the stage is again empty, but your work was not in vain because the symbol, like all symbols, is held in the library.


To open the library, choose Window, Library (PCCtrl+L, MacOpen Apple+L). The library should look like Figure 5.3, where you will also see the symbol we just created, squareG.

Figure 5.3. The library containing the squareG symbol.


To add an instance of this symbol to the stage, select it in the library and drag it out to the stage.

This example shows how to create a symbol from scratch and then create an instance of it on the stage, but many times you will already have a shape or other object on the stage that you want to make into a symbol.

Converting to a Symbol

Converting to a symbol is a slightly different process from creating one from scratch. To convert a selection to a symbol, choose Modify, Convert to Symbol (F8). This will produce the Convert to Symbol dialog box (see Figure 5.4), which looks similar to the Create New Symbol dialog box except for the Registration option. The Registration option enables you to select the alignment of your selection within the symbol.

Figure 5.4. The Convert to Symbol dialog box. Notice the Registration option.


You can also convert selections to a new symbol by dragging them directly into the library.

That covers the graphic symbol. Next up is the Button symbol, a much more interactive symbol, as you will see.

Macromedia Flash Professional 8 Unleashed
Macromedia Flash Professional 8 Unleashed
ISBN: 0672327619
EAN: 2147483647
Year: 2005
Pages: 319 © 2008-2017.
If you may any questions please contact us: