MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 479

Director scripting reference
Table of Contents

Advertisement

puppetSprite()
Usage
-- Lingo syntax
_movie.puppetSprite(intSpriteNum, bool)
// JavaScript syntax
_movie.puppetSprite(intSpriteNum, bool);
Description
Movie method; determines whether a sprite channel is a puppet and under script control (
or not a puppet and under the control of the Score (
While the playhead is in the same sprite, turning off the sprite channel's puppetting using the
syntax
puppetSprite(intSpriteNum
The sprite channel's initial properties are whatever the channel's settings are when the
puppetSprite()
If a sprite channel is a puppet, any changes that script makes to the channel's sprite properties
remain in effect after the playhead exits the sprite.
If a sprite channel is not a puppet, any changes that script makes to a sprite last for the life of
the current sprite only.
The channel must contain a sprite when you use the
Making the sprite channel a puppet lets you control many sprite properties—such as
, and
locH
width
Use the syntax
puppetSprite(intSpriteNum
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.
Parameters
Required. An integer that specifies the sprite channel to test.
intSpriteNum
Required. A boolean value that specifies whether a sprite channel is under script control
bool
(
) or under the control of the Score (
TRUE
Example
This statement makes the sprite in channel 15 a puppet:
-- Lingo syntax
_movie.puppetSprite(15, TRUE)
// JavaScript syntax
_movie.puppetSprite(15, true);
,
method is executed. You can use script to change sprite properties as follows:
—from script after the playhead exits the sprite.
).
FALSE
resets the sprite's properties to those in the Score.
FALSE)
puppetSprite()
,
to return control to the Score when you
FALSE)
).
FALSE
TRUE
method.
,
member
puppetSprite()
479
)

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents