• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 4. Flash and Generator > Applying Transformations

Applying Transformations

The properties of the text box you placed on the Stage are controlled by the color and font settings you chose on the Character panel. Wouldn’t it be convenient if you could dynamically change the color and size of your text without having to make modifications to the Flash file? Using Generator, you can.

Generator has a series of symbol commands that can be used to dynamically control any instance of a movie clip or graphic symbol on the Stage. There are seven symbol commands:

  • Replace. Enables you to replace the symbol in the template.

  • Replicate. Enables a symbol to display data from each row in a data source.

  • Set Alpha. Enables you to modify the transparency of a symbol.

  • Set Brightness. Enables you to adjust the brightness of a symbol.

  • Set Custom Color. Enables you to specify a custom color for a symbol.

  • Set Tint. Enables you to apply a tint to all colors in a symbol.

  • Transform. Enables you to scale, rotate, and offset a symbol.

There are a few caveats, however, that you need to keep in mind here:

  • You can apply the symbol commands only to instances of symbols.

  • You can apply only one command to each symbol instance.

  • This one is a little quirky—you can apply a symbol command to a graphic or movie clip inside a button only if the graphic or movie clip is, in turn, nested inside a second graphic or movie clip.


Generator has a thing with buttons. It doesn’t like to perform actions directly on buttons or to symbols inside buttons. Whenever you’re having button issues, either nest the button in a movie clip or nest the movie clip inside a button in another movie clip. Then everything works just fine. Why? It has to do with the way buttons are exported in a Generator template—they get incorporated into the parent timeline. This doesn’t happen to movie clips. Their timelines remain independent. Thus, for example, if you want to use Generator to dynamically change each button state, you need to use nested movie clip instances inside the button. If you want Generator to give all the button’s states the same color or tint, you can just nest the button in a movie clip and assign symbol commands to it.

Exercise 4.5 Converting Text Boxes to Symbols

To apply symbol commands to the text boxes you created, you need to convert them to symbols.

Continue working in banner4.fla or load it from the accompanying CD-ROM.

Use the Arrow tool to select the text box with the {companyName} variable. When the blue bounding box appears, press F8 (Insert > Convert to Symbol) on your keyboard.

In the Symbol Properties dialog box, type Company for the name of the symbol and accept the default movie clip behavior. (See Figure 4.12.)

Figure 4.12. The Symbol Properties dialog box with the settings for the new Company movie clip symbol.

Repeat Steps 2 and 3 for the {tagline} variable, but change the name to Tag.

Save your file as banner5.fla.

Next you modify your newly created symbols. You manipulate both the color and the position of your new symbols.

Exercise 4.6 Changing the Registration Point

Right now, the registration points for each movie clip are in the center of the clip— where the crosshair is. It is easier to visualize the position changes you want to make if you edit the movie clips so that the registration points are in the upper-left corner of the text box.

Continue in the same file or load banner5.fla from the accompanying CD-ROM. Double-click the Company movie clip on the Stage to open it in symbol-editing mode.

Use the Arrow tool to select the text box. Open the Info panel (Window > Panels > Info) and set both X and Y to 0. Make sure that the upper-left corner of the nine square box next to the X and Y settings is selected (or black) when you do this. (See Figure 4.13.)

Figure 4.13. The Company movie clip with its registration point set to the upper-left corner.

Return to the main timeline (Edit > Edit Movie) and repeat Steps 1 and 2 for the Tag movie clip.

Go back to the main timeline. Position both movie clips on the left side of the Stage. The top-left corner of the Company movie clip should be even with the top-left corner of the Stage. The Tag movie clip should line up beneath the Company movie clip. You can use the Info panel to position these movie clips precisely.

Save your file as banner6.fla.

Now that your text variables have been converted to symbols, it’s time to start applying some symbol commands.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint