To avoid problems in Lingo or JavaScript syntax when referring to cast members, name them and then refer to them by name. Naming cast members doesnt affect Director performance. The name stays the same even if the cast member number changes.
Avoid duplicating cast member names. If more than one cast member has the same name, Lingo or JavaScript syntax uses the cast member with the lowest number in the cast.
To name a cast member by using Lingo or JavaScript syntax, set the name Cast Member property. For more information about this property, see the Scripting Reference topics in the Director Help Panel.