
80
Chapter 3: Sprites
Subtract
subtracts the RGB color value of the foreground sprite’s color from the RGB value of
the background sprite’s color to determine the new color. If the color value of the new color is less
than 0, Director adds 256 so the remaining value is between 0 and 255.
Subtract Pin
subtracts the RGB color value of pixels in the foreground sprite from the value of
the background sprite. The value of the new color is not allowed to be less than 0. If the value of
the new color is negative, the value is set to 0.
Darken
changes the effect of the Foreground and Background color properties of a sprite to create
dramatic color effects that generally darken and tint a sprite. Darken ink makes the background
color equivalent to a color filter through which the sprite is viewed on the Stage. White provides
no filtering; black darkens all color to pure black. The foreground color is then added to the
filtered image, which creates an effect that is similar to shining light of that color onto the image.
Selecting Darken ink has no effect on a sprite until you select nondefault foreground and
background colors. See
“About Darken and Lighten inks” on page 78
.
Lighten
changes the effect of the Foreground and Background color properties of a sprite so that
it is easy to create dramatic color effects that generally lighten an image. Lighten ink makes the
colors in a sprite lighter as the background color gets darker. The foreground color tints the image
to the degree allowed by the lightening. See
“About Darken and Lighten inks” on page 78
.
Note:
Mask and Matte use more memory than other inks because Director must duplicate the mask
of the artwork.
Assigning a cast member to a sprite with Lingo or
JavaScript syntax
Several script properties specify the cast member that is assigned to a sprite. You can use
these properties to determine a sprite’s cast member and switch the sprite’s cast members as
the movie plays.
To specify the cast member, including its cast:
•
Set the
member
sprite property. For more information about this property, see the Scripting
Reference topics in the Director Help Panel.
Setting this property is the most reliable way to specify a sprite’s cast member. You can also set
the
memberNum
sprite property, but this is reliable only when the new cast member is in the
same cast as the current cast member.
To determine which cast contains the cast member assigned to a sprite:
•
Test the
castLibNum
sprite property. For more information about this property, see the
Scripting Reference topics in the Director Help Panel.
This procedure is useful for updating movies that serve as templates.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...