Creating and modifying behaviors
Without any scripting or programming experience, you can use the Behavior inspector to create
and modify behaviors to perform basic actions. To create behaviors with more complex structures,
you must understand scripting in Lingo or JavaScript syntax.
Using the Behavior inspector is a good way to learn Lingo or JavaScript syntax. You can examine
the scripts created by the Behavior inspector to see how basic functions are assembled. To view the
associated script, select any behavior and click the Script button.
Most behaviors detect an event and then perform one or more actions in response. The Behavior
inspector lists the most common events and actions used in behaviors.
For experienced programmers, the Behavior inspector also provides a shortcut for writing
simple scripts.
Note: To always edit behaviors in the Script window instead of the Behavior inspector, select Edit >
Preferences > Editors. In the Editors Preferences dialog box, select Behaviors from the list and then
click Edit. In the Select Editor box, select Script Window. (If you are using a Macintosh OS X
operating system, select the Director menu, instead of the Edit menu, to access Preferences.)
To create or modify a behavior:
Do one of the following:
1
To create a new behavior, click the Behaviors pop-up menu, select New Behavior, and enter
a name for the new behavior.
The behavior appears in the currently selected Cast window in the first empty position.
Select an empty cast position first if you want the behavior to appear in a different place.
To modify a behavior, select it in the Behavior inspector.
Click the arrow in the lower left of the Behavior inspector to expand the editing pane.
2
The editing pane shows the events and actions in the current behavior. If you are creating a
new behavior, no events or actions appear.
To add a new event or action group to the behavior, select an event from the Events pop-up
menu and then select actions for the event from the Actions pop-up menu.
Click here to expand the editing pane
Creating and modifying behaviors
279
Need help?
Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?
Questions and answers