Symbol Instances


Master symbols are the stored templates in the library. The copies of the symbol out on the stage are the instances. You know that symbol instances are crucial for keeping file size down. This next section covers the specifics of how to work with instances on the stage.

For the most part, you work with symbol instances just as you do any other visual element on the stage. You can change their x and y locations by typing them in the Property inspector or by dragging them around the stage. All symbols are aligned to x and y on the main timeline by their upper-left corner, regardless of where the registration point is set inside the symbol. You can copy and paste them across layers, duplicate them, and if there is more than one symbol in a layer then you can even arrange them so that they fall in front of or behind the other instances on the same layer (Modify, Arrange). The true power of instances comes into play when you start changing some of their surface qualities (their properties) to make each instance somewhat unique.

You can change the behavior of individual instances, such as a movie clip to a button or a graphic to a movie clip, essentially changing the type of symbol it is. To change the type of symbol of a single instance, first select it. In the Property inspector, pull down the menu that shows the current symbol type of your instance (see Figure 10.12). Changing the type makes the instance behave according to the rules already established in the earlier sections. Button symbols enable the user to click and have a four-frame timeline. Movie clips have independent timelines and can contain buttons, actions, and complete interactive timelines of their own. Graphic symbols are slaved to the timeline and have behaviors such as loop and single frame that are helpful in animation.

Figure 10.12. Menu for changing symbol type in the Property inspector.


Another helpful way to change your symbol instance as you work is to swap the master symbol link for any instance with a different master symbol. Imagine you discover that instead of a blue flower in an animation, what you really need is that red flower you created a couple of hours ago. So you select the symbol instance of the blue flower, choose the Swap button in the Property inspector, and then select the red flower master symbol in the Swap Symbol dialog box (see Figure 10.13). Press the OK button and your symbol is now changed to the new symbol, retaining all the changes you made to your old instance but using another master symbol.

Figure 10.13. Swap Symbol dialog box.


Instance Transformations

Although you can't break the association with the visuals that live inside of the master symbol, you can make some physical changes to the instance on the stage by scaling, skewing, and rotating the instance without affecting the master symbol. This is when symbols really become useful as you create illustrations and animations that reuse symbols over and over, with slight variations to each instance.

For example, imagine you created a tree. You made the tree a symbol and then duplicated the instance on the stage. Now you can arrange those instances in front or in back of each other by using Modify, Arrange, Bring Forward, or Send Back. You can move one tree to the other side of the stage and choose Modify, Transform, Flip Horizontal and have it look like a very different tree. You can select the Free Transform tool and rotate the tree slightly or squash it down so that it can be used as a bush (see Figure 10.14).

Figure 10.14. Using the Free-Transform tool to squash an instance of a tree symbol so that it looks like a bush.


Beyond those transformations you can also affect the overall color of the instance by applying a color effect to an individual instance. Select the instance and choose Brightness, Tint, Alpha, or Advanced from the Color menu in the Property inspector. Brightness gives a highlight or shadow affect. With Tint you can apply an overall color to the instance by choosing from the color picker and then changing how much it affects the color with a percentage slider. The Alpha effect enables you to change the transparency of the instance (see Figure 10.15). Be aware that this can be processor intensive if applied to many instances. And finally, the Advanced option enables you to work with individual color sliders to produce more complex color transformations.

Figure 10.15. Using the Color menu to set the Alpha value and change the transparency of an instance.


Finally, with movie clip symbols you can apply a new effect called a blend. Blend modes enable your instance to interact with other elements on the stage in varying ways. For instance, if you select one instance that lies on top of another instance and choose Multiply from the Blend menu in the Property inspector, you can see both shapes with the overlap multiplying the combined colors and transparencies. Figure 10.16 shows the Invert Blend mode applied to a movie clip symbol.

Figure 10.16. Applying the Invert Blend mode to a movie clip symbol.


One of the big concerns in Flash when using Blend effects is that, as with Alpha effects, using too many of them can slow down playback of your movie because of how long it takes to redraw each frame. One of the ways that Flash 8 helps with this issue is by enabling you to select Use Runtime Bitmap Caching (below the Blend menu in the Property inspector). This uses a sophisticated method of converting the vector graphics in your movie clip into a bitmap at run-time. It also eliminates the need for the Flash player to repeatedly convert vector descriptions of the shapes in the movie clip before redrawing them in a new position on the screen. An entire processing step is eliminated. This is particularly helpful for large and complex static vector illustrations that might slow down your animation. Make them into a single movie clip and turn on Use Cache As Bitmap. This improves the performance of the entire movie.

Removing Transformations

To remove any of these transformations and return to your symbol as it was originally, you can always select the instance and choose Modify, Transform, Remove Transform. This snaps the shape and alignment to their original specifications. This does not, however, remove any effects that you added. You must do this manually by setting each menu to None in the Property inspector.

Breaking a Symbol Apart from the Master

Sometimes, as you work with instances, you might want to break your association with a master symbol and manipulate the shape directly. To do so you can simply choose Modify, Break Apart or press (Cmd-B) [Ctrl+B]. This breaks the link with the symbol and returns the internal contents to the stage as they were when you created them. You can then manipulate them as usual and reconvert them into another symbol if you wish.



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net