Using Director > Behaviors > Setting behavior properties with Lingo |
![]() ![]() ![]() |
Setting behavior properties with Lingo
Behaviors usually have properties for which each instance of the behavior maintains its own values. (An instance is each sprite or frame that the behavior is attached to.) These properties are shared among handlers in a behavior's script the same way that properties are shared among handlers in an object.
To declare which properties can have independent values in each instance of the behavior:
Put the property
statement at the beginning of the behavior's script.
A property
statement starts with the word property
followed by the names of the individual properties. For example, the statement property movement
declares that movement
is a property of the behavior.
![]() ![]() ![]() |