Using Director > Sprites > Assigning a cast member to a sprite with Lingo |  |

Assigning a cast member to a sprite with Lingo

Several Lingo properties specify the cast member assigned to a sprite. You can use these properties to determine a sprite's cast member and switch the sprite's cast members as the movie plays.

To specify the cast member, including its cast:

Set the `member` sprite property. See `member (sprite property)`.

Setting this property is the most reliable way to specify a sprite's cast member. You can also set the `memberNum` sprite property, but this is reliable only when the new cast member is in the same cast as the current cast member.

To determine which cast contains the cast member assigned to a sprite:

Test the `castLibNum` sprite property. See `castLibNum`.

This procedure can be useful for updating movies that serve as templates.