Using Director > Behaviors > Writing behaviors with Lingo |
![]() ![]() ![]() |
Writing behaviors with Lingo
If you are familiar with Lingo, you can author your own behaviors.
From the perspective of Lingo, a behavior is a script with these additional features:
![]() |
Each instance of the behavior has independent values for properties. Lingo uses a |
![]() |
The same set of handlers can be shared by multiple sprites or frames. |
The handlers in a behavior are basically the same as other handlers. Include as many handlers as appropriate to implement the behavior. |
|
A behavior is usually attached to multiple sprites or frames. As a result, the sprites and frames share the same handlers. Director tracks which instance of the behavior is which by assigning each instance a reference number. The variable |
|
In many cases it's most efficient to create behaviors dedicated to specific tasks and then attach a set of behaviors that perform the variety of actions you want. |
|
![]() |
The behavior can have parameters that users edit from the Parameters dialog box. The optional |
![]() |
A description of the behavior can be added to the Behavior Inspector. The optional |
![]() |
A brief description appears as a tooltip for the behavior in the Library palette if the optional |
![]() ![]() ![]() |