Alpha Transparency and Brightness


You can use alpha transparency and brightness to create interesting effects. Changes in the alpha transparency can be used to make text fade in or fade out. At intermediate settings, you can use alpha transparency to complement other elements in a movie.

Brightness adjusts the relative lightness or darkness of the image from black to white. On a black or white background, you can use brightness as an alternative to changing the alpha transparency. The bonus is that brightness changes are far less CPU- intensive than alpha changes.

A very effective, if potentially CPU-intensive, effect is to use alpha transparency and tweening over a bitmap.

Exercise 7.2 Using Alpha Transparency to Create a Text Effect

The base for this file has already been created for you.

  1. Open alpha.fla from the Chapter_07/Assets folder on the CD. In this exercise, you'll still be using the Character panel (Window > Panels > Character) and the Mixer panel (Window > Panels > Mixer). At the lower part of the image is a cropped version of the phrase "In God We Trust." You can overlay that phrase fragment with the complete phrase and animate it for an interesting and organic effect.

  2. Select the Text tool and use the Character panel to select the font Garamond Book, or some other font similar to the one in the graphic image. Set the height of the font to roughly match the height of the font on the Stage. If you are using Garamond Book, the height should be about 170.

  3. Use the Mixer panel to set the font to white, with an Alpha setting of 50%.

  4. Add a new layer named Text above the Background layer. With the new layer selected, type the phrase In God We Trust on the Stage. Position the text so that it almost, but not quite, matches the text in the background graphicoffset it slightly (see Figure 7.4).

    Figure 7.4. By adding text with an Alpha setting of 50% over the background, along with some tweening, you can create an interesting effect.

    graphics/07fig04.gif

  5. Make this more interesting by adding a little motion. Remember, a little goes a long way.

  6. To start setting up your tweens, insert a keyframe (F6) in frame 4 of the Text layer. These movements will be subtlenothing too overt.

  7. Select the text block on the Stage, and use Left Arrow on your keyboard to nudge the text about 10 pixels to the left.

    Add a motion tween by selecting any frame between your two keyframes and then either right- or Control-clicking and choosing Create Motion Tween. Alternately, you can launch the Frames panel (Window > Panels > Frames ) and choose Motion from the Tweening drop-down list.

    Tip

    You can use the arrow keys on the keyboard to move selected items on the Stage by 1 pixel at a time. If you hold down the Shift key and press one of the Arrow keys, you can move the item by 8 pixels at a time. One caveat here: You will always move by either 1 or 8 screen pixels, regardless of the magnification. That means that if you have the object highly magnified, the movement that you get by using the Arrow keys may be more subtle than you intended.

  8. Add another keyframe in frame 10 of the Text layer, and move the text block back to its original position (move it 10 pixels to the right). Add a motion tween the same way you did in Step 8.

  9. Add a keyframe in frame 16, and move the text block another 10 pixels to the right. Add in your tween.

  10. Add one more keyframe in frame 25, and move the text block 10 pixels back to the left. Don't forget your motion tween.

  11. Test your file. The translucent letters shifting back and forth over the static text give an interesting feel to the piece.

Because this movie has a patterned background, using brightness to simulate an Alpha effect doesn't work. But in the next section, you'll take a look at tweening text on a path and using brightness to fade it in and out on a white background.



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