Beginner's Guide to Adobe Flash/Symbols

From Wikibooks, open books for an open world
Jump to: navigation, search

Symbols are really the foundation of interactive project development. They help keep file size down, aid in organization, and allow you to use ActionScript to manipulate their appearance. In this chapter, we will be looking at how to make and use symbols, as well as a consideration of the three symbol types and their uses.

A symbol is a reusable image, animation, graphic, movie clip, sound file, font or button that resides in the library. A bitmap (any imported graphic file) is not as controllable as a symbol. For example the alpha/opacity of a bitmap cannot be keyframed for dissolves but a symbol can be. A graphic can be placed in a symbol by entering symbol edit mode and importing the symbol into the symbol stage. Enter symbol edit mode by clicking the + button in the library.

Moving an element to the library converts it to a symbol. (If the Library is not open, open it with Ctrl-L.) If a symbol is dragged into the Library and it has the same name as an existing symbol, the new symbol replaces the old. A Resolve Library Item Conflict requestor appears. Select Replace. Library folders can help avoid same file name problems. If a symbol is dragged out of the library an instance of it (a copy) is created. Changing an instance of a symbol on the stage does not change the master copy. The master symbol can be changed through symbol Edit mode (double click the symbol in the library.) Instances can be named in the Properties panel.

To create a new symbol: Insert > New Symbol (or Ctrl-F8) brings up a requestor that wants to know the type of symbol being created (movie clip, button or graphic) and a name for it. It then takes you to symbol edit mode where you create and edit the symbol. A symbol has its own Timeline and layers, independent of the scene Timeline that it is in. A symbol can be composed of many layers and manipulated as a single object. To convert a graphic to a symbol select it and Insert > Convert To Symbol. A Symbol can also be created by dragging an object from the stage to the library. The object on the stage that was dragged into the library will be converted to a symbol and a symbol icon will appear in the library. A Convert to Symbol dialog box appears with several behavior buttons that determine how the symbol will be used. These behaviors are:

Graphic – Used for static images and animations that are tied to the main Timeline. Graphic symbols are created with Flash draw tools. Their icons look like a hazardous waste symbol.

Button – Responds to mouse clicks and other events. Graphics are defined for various button states. Actions are assigned to the button instance. A button symbol icon is a finger on a button.

Movie Clip – Reusable animations. They have their own Timelines that run independently of the main Timeline. They are like mini-movies that run inside the main movie. They can contain interactive controls and can be controlled by ActionScript.

The instance’s type can be changed at any time through the Property Inspector.

Symbols can be edited in context (with other elements on the stage, called Edit In Place) or they can be edited in a separate window. If a master symbol is changed then every existing instance of that symbol will display the changes: Edit > Symbol or double click on the symbol in the library or use the + icon in the library.

A symbol can be copied in the library panel by selecting it and Modify > Duplicate Symbol. This is a good way to make new symbols using existing symbols as templates.

Frames from one symbol can be copied into another symbol: Select the frames to be copied on the main Timeline and Edit > Copy Frames. Then create a new symbol. Select frame one of the new symbol and Edit > Paste Frames.

Each object has a registration point used to place the element on the stage. This info is listed in the Info Panel: Window > Panels > Info. An Align Panel is available for aligning elements relative to each other: Window > Panel > Align. A Registration tool is used to place the registration point on the object.

Effects can be applied to a selected symbol with Window > Panels > Effects. Effects include color/transparency, animation and sound effects. Single instances or multiple instances of a symbol can be edited. Edit > Edit Symbols.

The link between an instance and a symbol can be broken which turns the instance into a collection of pieces parts. Select the instance. Modify > Break Apart.

Instances can be linked to different symbols in order to retain their properties. A rat symbol for instance could be changed to a cat symbol and its color and movements would be preserved.

To assign a different symbol to an instance select the instance on the stage and click the Swap button in the Property Inspector. Select a new symbol from the Swap Symbol dialog box. The Swap Symbol dialog box also has a Duplicate button that creates a copy of the selected symbol.