Lingo Dictionary > O-R > puppet |  |

puppet

Syntax

    sprite(whichSprite).puppet
    the puppet of sprite whichSprite

Description

Sprite property; determines whether the sprite channel specified by `whichSprite` is a puppet under Lingo control (`TRUE`) or not (`FALSE`, default).

| 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 leaves 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.

While the playback head is in the same sprite, setting the sprite channel's`puppet` sprite property to `FALSE` resets the sprite's properties to those set in the Score.

Making the sprite channel a puppet lets you control many sprite properties, such as `member`, `locH`, and `width`, from Lingo after the playback head exits from the sprite.

Setting the `puppet` sprite property is equivalent to using the `puppetSprite` command. For example, the following statements are equivalent: `set the puppet of sprite 1 to TRUE` and `puppetSprite 1, TRUE.`

This property can be tested and set.

Example

This statement makes the sprite numbered i + 1 a puppet:

    sprite(i + 1).puppet = TRUE

Example

This statement records whether sprite 5 is a puppet by assigning the value of the`puppet` sprite property to the variable. When sprite 5 is a puppet, `isPuppet` is set to `TRUE`. When sprite 5 is not a puppet, `isPuppet` is set to `FALSE`.

    isPuppet = sprite(5).puppet

See also

`puppetSprite`