Lingo Dictionary > O-R > puppetPalette

 

puppetPalette

Syntax

puppetPalette whichPalette {, speed} {,nFrames}

Description

Command; causes the palette channel to act as a puppet and lets Lingo override the palette setting in the palette channel of the Score and assign palettes to the movie.

The puppetPalette command sets the current palette to the palette cast member specified by whichPalette. If whichPalette evaluates to a string, it specifies the cast name of the palette. If whichPalette evaluates to an integer, it specifies the member number of the palette.

For best results, use the puppetPalette command before navigating to the frame on which the effect will occur so that Director can map to the desired palette before drawing the next frame.

You can fade in the palette by replacing speed with an integer from 1(slowest) to 60 (fastest). You can also fade in the palette over several frames by replacing nFrames with an integer for the number of frames.

A puppet palette remains in effect until you turn it off with the command puppetPalette 0. No subsequent palette changes in the Score are obeyed when the puppet palette is in effect.

Note: The browser controls the palette for the entire Web page. Thus, Shockwave and the Director player for Java always uses the browser's palette.

For the most reliable color when authoring a movie for playback as a Director player for Java, use the default palette for the authoring system.

Example

This statement makes Rainbow the movie's palette:

puppetPalette "Rainbow"

Example

This statement makes Grayscale the movie's palette. The transition to the Grayscale palette occurs over a time setting of 15 and between frames labeled Gray and Color.

puppetPalette "Grayscale", 15, label("Gray") - label("Color")