Lingo Dictionary > O-R > puppetSprite |
![]() ![]() ![]() |
puppetSprite
Syntax
puppetSprite
whichChannel
,
state
Description
Command; determines whether the sprite channel specified by whichSprite
is a puppet and under Lingo control (TRUE
) or not a puppet and under the control of the Score (FALSE
).
While the playback head is in the same sprite, turning off the sprite channel's puppetting using the command puppetSprite
whichSprite
, FALSE
resets the sprite's properties to those in the Score.
The sprite channel's initial properties are whatever the channel's settings are when the puppetSprite
command is executed. You can use Lingo to change sprite properties as follows:
![]() |
If a sprite channel is a puppet, any changes that Lingo makes to the channel's sprite properties remain in effect after the playback head exits the sprite. |
![]() |
If a sprite channel is not a puppet, any changes that Lingo makes to a sprite last for the life of the current sprite only. |
The channel must contain a sprite when you use the puppetSprite
command.
Making the sprite channel a puppet lets you control many sprite propertiessuch as memberNum
, locH
, and width
from Lingo after the playback head exits the sprite.
Use the command puppetSprite
whichSprite
, FALSE
to return control to the Score when you finish controlling a sprite channel from Lingo and to avoid unpredictable results that may occur when the playback head is in frames that aren't intended to be puppets.
Note: Version 6 of Director introduced autopuppeting, which made it unnecessary to explicitly puppet a sprite under most circumstances. Explicit control is still useful if you want to retain complete control over a channel's contents even after a sprite span has finished playing.
Example
This statement makes the sprite in channel 15 a puppet:
puppetSprite 15, TRUE
Example
This statement removes the puppet condition from the sprite in the channel numbered i + 1:
puppetSprite i + 1, FALSE
See also
backColor
, bottom
, constraint
, foreColor
, height
, ink
, left
, lineSize
, locH
, locV
, memberNum
, puppet
, right
, top
, type (sprite property)
, width
, cursor (command)
![]() ![]() ![]() |