The puppetPalette command can be used to change the current palette and to create transitions between the current palette and the one being changed to:
puppetPalette "myPalette", 20 -- 20 represents the rate if transitionLike puppetSprite channels, puppetPalettes persist until reset with a
puppetPalette 0command, and the contents of the palette channel will be ignored until such a command is issued.
Other palette channel effects, like Fade To Black, cannot be directly performed from Lingo.
Transitions can be generated with the puppetTransition command:
puppetTransition 37, 0, 8, false-- see the Lingo Dictionary for a full list of the parameters for this!
The transition will occur on the next frame entry. This includes re-entering the current frame. If you are paused on the frame, you could force the transition to occur by adding
go the frameafter your puppetTransition command. Puppet transitions do not persist, but take place only once.
The sound channel can be puppeted using the puppetSound command, for which the official syntax is:
puppetSound mySoundCastIn this case, only sound channel 1 is affected. PuppetSound both specifies a sound to be played and makes the first sound channel a puppet. The channel remains under lingo control until a
puppetSound 0command is issued. Until then, score instructions in sound channel 1 will be ignored and sounds will only be played by issuing further puppetSound commands.
However, an undocumented feature is the use of puppetSound with multiple sound channels:
puppetSound channelNumber, cast mySoundCastWith Macromedia's MacroMix DLL providing the mixing ability of Apple's Sound Manager 3 under Windows, this seems to work seamlessly cross-platform as of version 4.0.4, but as usual the caveats of section 1.8 need be borne in mind.
The volume of individual sound channels can be varied independently by using the volume of sound property:
set the volume of sound channelNumber = 255Sound volume is officially restricted to the range 0-255, but on the Mac at least it may be overdriven to higher levels if desired.
Finally, the tempo can be changed using the puppetTempo command:
puppetTempo 30This will adjust the frame rate of the Director movie. The new tempo stays in effect until altered either by another puppetTempo command or by a change in the tempo channel.
Other tempo channel effects (waiting for a specific time or for a particular event) must be scripted explicitly. This is commonly done by looping on the frame until the required event takes place, eg to wait for a mouseClick:
-- you probably shouldn't do this this way with a slow frameRate...
on exitFrame
if not the mouseDown then go the frame
end exitFrame