Objec Script
For each graphic object controlled is possible to associate a script in addition to the execution of pre-configured actions.
The script allows you to define procedures for handling the following events:
|
Entrance of the mouse pointer in the animation |
|
Release the mouse pointer while over the animation |
|
Pressing the mouse button over the animation. |
|
Event generated periodically while the mouse button is pressed on the animation |
|
Release the mouse button while over the animation |
|
Click the mouse button or activation by keyboard |
|
Double click the mouse over the animation. |
The period of execution of the procedure WhileMouseDown is configurable by setting the Period property in the animation properties. It can also be modified internally to the script using the Period variable to set the desired value. In both cases, the period is expressed in milliseconds.
You can pass a parameter string to the script by setting the property CommandLine in the animation properties. This string can be queried within the script with the CommandLine () function.

Note: the execution of the script associated with an animation always starts with an event. You can select the event from the Proc combobox and write the code to handle the event:

Note: Scripts related to animation are preserved by copying and pasting the animation itself.
Notes about event generation
- A double click generates the following sequence of events:
OnMouseDown
OnMouseUp
OnClick
OnDblClick
OnMouseUp
If the object has been configured with pre-wired action, this is done after handling the event OnMouseUp.
- If the mouse button is pressed while the pointer is over an animation and then moved and relesed over another animation, the the events sequence is as follows:
|
OnMouseDown |
Animation 1 |
|
OnMouseUp |
Animation 1 |
|
OnClick |
Animation 1 |
|
OnMouseLeave |
Animation 1 |
|
OnMouseEnter |
Animation 2 |
.
- If the declaration of an event procedure is present, even if empty, the animation is considered active. If the object is grouped, then the action is then intercepted by the animation and not by the group, while the unmanaged events are intercepted from the group. It is therefore generally advisable to remove declarations of unhandled (empty) event procedures.