Using Sprite Ink Effects

   

Director features a collection of ink effects that change the appearance of sprites on the Stage. Most of these effects are especially effective when sprites overlap. You can use ink effects to make sprites transparent, to darken or lighten them, or to apply a variety of color transformations. You can also use them to make the background of a sprite disappear (see Chapter 7, "Drawing Vector Shapes").

Note that sprite ink effects are different from those that you can apply to bitmaps in the Paint window. Ink effects in the Paint window (which you'll learn about in Chapter 6, "Using Paint Tools.") change the actual cast member. Sprite ink effects affect only sprites, not the cast members on which they are based. The names and functions of the ink effects in the two sets have differences as well.

To set an ink effect for a sprite:

  1. Select a sprite in the Score or on the Stage.

  2. Choose Modify > Sprite > Properties.

  3. From the Ink pop-up menu, choose an ink effect ( Figure 3.67 ).

    Figure 3.67. Use the Ink pop-up menu in the Property Inspector to choose an ink effect for a selected sprite.

    graphics/03fig67.gif

    The "Score Ink Effects" sidebar describes the effects of the inks on sprites.

graphics/tick.gif Tip

  • Using ink effects other than the default Copy effect can slow your movie's animation. Try to use ink effects in strategic places, rather than across the board, if speedy animation is important in your project.


Score Ink Effects

Although these explanations help you imagine the differences from one effect to another, the best way to understand them is to try them out.

Copy This is the default ink effect for all sprites. The sprite is displayed exactly like its corresponding cast member. If the cast member is not rectangular, the sprite is surrounded by a white rectangle (which is only evident if the sprite is placed against a nonwhite background).

Matte Sprites appear without the white rectangle associated with the Copy ink effect, but they use more memory and animate less quickly than those that use the Copy effect.

Background Transparent White pixels in the sprite are transparent. (If a background color other than white is selected, pixels of that color are transparent instead).

Transparent White pixels are transparent, black pixels are opaque , and other colors have varying degrees of transparency depending on their lightness or darkness .

Reverse When a sprite with this ink effect overlaps another sprite, the overlapping areas change to the opposite of their normal color. White pixels become transparent.

Ghost This effect works like the Reverse ink effect, except that all non-overlapping areas of the sprite are transparent. (In other words, the sprite is invisible except where it overlaps another sprite.)

Not Copy, Not Transparent, Not Reverse, Not Ghost These ink effects act like the standard Copy, Matte, Transparent, and Ghost effects, except that they first reverse the foreground color of a sprite.

Mask This ink effect permits you to use another cast member (a mask) to specify which parts of a sprite are transparent. For more information, see "Using Ink Masks" in Chapter 7.

Blend White pixels in the sprite are transparent. All other colors take on the level of transparency specified in the Blend box on the Sprite tab of the Property Inspector.

Darkest When a sprite with this ink effect overlaps a sprite of a different color, the overlapping areas display the darker of the two colors.

Lightest This effect works like the Darkest ink effect, except the overlapping areas display the lighter of the two colors.

Add When a sprite with this ink effect overlaps another sprite, Director repaints the overlapping area with a new color that is created by adding the palette indexes of the overlapping pixels. If the new color has a palette index greater than 255 (the last color in the palette), Director subtracts 256 from the palette index and displays the resulting color.

Add Pin This effect works the same way as the Add ink effect, except that if the new color has a palette index greater than 255, Director changes it to the color whose index is 255 (which, in most palettes, is black).

Subtract When a sprite with this ink effect overlaps another sprite, Director repaints the overlapping area with a new color created by subtracting the palette index of the foreground color from that of the background color. If the new color has a palette index less than 0, Director adds 256 to the palette index and displays the resulting color.

Subtract Pin This effect works the same way as the Subtract ink effect, except that if the new color has a palette index less than 0, Director changes it to the color whose index is 0 (which, in most palettes, is white).

Darken The background color of the sprite is used to filter all areas of the sprite, and the foreground color of the sprite is added to all the filtered areas. The result looks similar to what print designers call a "duotone."

Lighten This effect works similarly to the Darken ink effect, except that the filtering action of the background color is used to lighten rather than darken the sprite.

   


Macromedia Director MX for Windows and Macintosh. Visual QuickStart Guide
Macromedia Director MX for Windows and Macintosh. Visual QuickStart Guide
ISBN: 1847193439
EAN: N/A
Year: 2003
Pages: 139

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