A Director movie can contain four types of scripts: behaviors, movie scripts, parent scripts, and scripts attached to cast members. Behaviors, movie scripts, and parent scripts all appear as independent cast members in the Cast window. A script attached to a cast member is associated with that cast member in the Cast window and does not appear independently.
When used in the Director Scripting Reference, the term behavior refers to any script that you attach to a sprite or a frame. This differs from the behaviors that come in the Director Library Palette. For more information on these behaviors, which are built into Director, see the Using Director topics in the Director Help Panel.
All behaviors that have been added to a cast library appear in the Behavior inspectors Behavior pop-up menu. Other types of scripts do not appear there.
You can attach the same behavior to more than one location in the Score. When you edit a behavior, the edited version is applied everywhere the behavior is attached in the Score.
A movie script icon appears in the lower-right corner of the movie scripts Cast window thumbnail.
Movie scripts are available to the entire movie, regardless of which frame the movie is in or which sprites the user is interacting with. When a movie plays in a window or as a linked movie, a movie script is available only to its own movie.
For information on using parent scripts and child objects, see Object-oriented programming with Lingo syntax.
JavaScript syntax does not use parent scripts or child objects; it uses regular JavaScript syntax-style object-oriented programming techniques. For information on object-oriented programming in JavaScript syntax, see Object-oriented programming with JavaScript syntax
Unlike behaviors, movie scripts, and parent scripts, cast member scripts do not appear in the Cast window. However, if Show Cast Member Script Icons is selected in the Cast Window Preferences dialog box, cast members that have a script attached display a small script icon in the lower-left corner of their thumbnails in the Cast window.