Lingo Dictionary > A-C > castLibNum

 

castLibNum

Syntax

member(whichCastMember).castLibNum
the castLibNum of member whichCastMember
sprite(whichSprite).castLibNum
the castLibNum of sprite whichSprite

Description

Cast member and sprite property; determines the number of the cast that contains the specified cast member, or which castLib is currently associated with the specified sprite.

If you change the castLibNum sprite property without changing the memberNum sprite property, Director uses the cast member that has the same cast member number in the new cast. This is useful for movies that you use as templates and update by supplying new casts. If you organize the cast contents so that each cast member has a cast member number that corresponds to its role in the movie, Director automatically inserts the new cast members correctly. To change the cast member assigned to a sprite regardless of its cast, set the member sprite property.

For a castmember, this property can be tested but not set. It can be both tested and set for a sprite.

Example

This statement determines the number of the cast to which cast member Jazz is assigned.

Dot syntax:

put member("Jazz").castLibNum

Verbose syntax:

put the castLibNum of member "Jazz"

Example

This statement changes the cast member assigned to sprite 5 by switching its cast to Wednesday Schedule.

Dot syntax:

sprite(5).castLibNum = castLib("Wednesday Schedule").number

Verbose syntax:

set the castLibNum of sprite 5 to the number of castLib "Wednesday Schedule"