-- 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 channel's puppetting using the syntax puppetSprite(intSpriteNum, 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() 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 aren't intended to be puppets.
Note: Version 6 of Director introduced autopuppetting, 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.
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);
makeScriptedSprite(), Movie, Sprite Channel
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/director/mx2004/release_update_en/07_me326.htm