Using Symbol Commands


Using symbol commands is an easy way to customize movie clip and graphic symbol instances on the Stage. You're going to be working with two of the symbol commands in this section: Set Tint and Transform. You'll use Set Tint to change the color of the instances and Transform to reposition the instances.

Set Tint has four settings that can be changed: Percent, Red, Green, and Blue. You use the Red, Green, and Blue settings to specify the color of the tint. The Percent setting is used to determine the degree of the tint applied.

Note

What you are changing when you change the tint are the RGB colors of the image. Red, green, and blue are the three additive primary colors used in computer graphics. Each color channel can have a value ranging from 0255.


Transform has five settings:

  • X Scale

  • Y Scale

  • X Offset

  • Y Offset

  • Rotation

The X and Y Scale settings let you scale the symbol instance in the horizontal (X Scale) and vertical (Y Scale) directions. To move symbols either horizontally or vertically, use the X and Y Offsets. Rotation determines the number of degrees to rotate the symbol. Use positive numbers for clockwise rotation and negative numbers for counterclockwise rotation.

Exercise 4.7 Using the Set Tint Symbol Command

In this exercise, you use the Set Tint symbol command to change the color of the movie clip instances containing your variables . This changes the color of the text in those symbols.

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

  2. Select the instance of the Company movie clip currently on the Stage. Open the Generator panel if it is not already open (Window > Panels > Generator).

  3. Click the drop-down arrow next to <no selections>.

    You should see all the available symbol commands. (See Figure 4.14.)

    Figure 4.14. The Generator panel showing all the available symbol commands.

    graphics/04fig14.gif

  4. Select Set Tint. You want to apply an opaque tint of pure green to the Company variable. Change the settings on the Generator panel (shown in Figure 4.15) to this:

    Percent: 100

    Red:

    Green: 255

    Blue:

    Figure 4.15. The Generator panel with Set Tint selected.

    graphics/04fig15.gif

  5. Save your file as banner7.fla and test your movie.

The company name should appear as bright green.



Inside Flash
Inside Flash MX (2nd Edition) (Inside (New Riders))
ISBN: 0735712549
EAN: 2147483647
Year: 2005
Pages: 257
Authors: Jody Keating

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