Lingo Dictionary > O-R > paletteMapping |  |

paletteMapping

Syntax

    the paletteMapping

Description

Movie property; determines whether the movie remaps (`TRUE`) or does not remap (`FALSE,` default) palettes for cast members whose palettes are different from the current movie palette. Its effect is similar to that of the Remap Palettes When Needed check box in the Movie Properties dialog box.

To display different bitmaps with different palettes simultaneously, set `paletteMapping` to `TRUE`. Director looks at each onscreen cast member's reference palette (the palette assigned in its Cast Member Properties dialog box) and, if it is different from the current palette, finds the closest match for each pixel in the new palette.

The colors of the nonmatching bitmap will be close to the original colors.

Remapping consumes processor time, and it's usually better to adjust the bitmap's palette in advance.

Remapping can also produce undesirable results. If the palette changes in the middle of a sprite span, the bitmap immediately remaps to the new palette and appears in the wrong colors. However, if anything refreshes the screen—a transition or a sprite moving across the Stage—then the affected rectangle on the screen appears in remapped colors.

Example

This statement tells the movie to remap the movie's palette whenever necessary:

    set the paletteMapping = TRUE