-- Lingo syntax _movie.puppetSprite(intSpriteNum, bool) // JavaScript syntax _movie.puppetSprite(intSpriteNum, bool);
Movie method; determines whether a sprite channel is a puppet and under script control (TRUE) or not a puppet and under the control of the Score (FALSE).
While the playhead is in the same sprite, turning off the sprite channels puppetting using the syntax puppetSprite(intSpriteNum, FALSE) resets the sprites properties to those in the Score.
The sprite channels initial properties are whatever the channels settings are when the puppetSprite() method is executed. You can use script to change sprite properties as follows:
The channel must contain a sprite when you use the puppetSprite() method.
Making the sprite channel a puppet lets you control many sprite properties--such as member, locH, and width--from script after the playhead exits the sprite.
Use the syntax puppetSprite(intSpriteNum, FALSE) to return control to the Score when you finish controlling a sprite channel from script and to avoid unpredictable results that may occur when the playhead is in frames that arent intended to be puppets.
intSpriteNum Required. An integer that specifies the sprite channel to test.
bool Required. A boolean value that specifies whether a sprite channel is under script control (TRUE) or under the control of the Score (FALSE).
This statement makes the sprite in channel 15 a puppet:
-- Lingo syntax _movie.puppetSprite(15, TRUE) // JavaScript syntax _movie.puppetSprite(15, true);
This statement removes the puppet condition from the sprite in the channel numbered i + 1:
-- Lingo syntax _movie.puppetSprite(i + 1, FALSE) // JavaScript syntax _movie.puppetSprite(i + 1, false);