You can attach an animation sequence to be used when the user chooses the control or drops an object on it.
In order to have an animation sequence, a control must:
Be type icon
Have a PUSH_ACTION or DROP_ACTION
Specify the animation sequence using the ANIMATION component:
ANIMATION animation_name
{
ANIMATION icon1 [milisecond_delay]
ANIMATION icon2 [milisecond_delay]
…
}
where icon1, icon 2, etc. are the names of icons, and milisecond_delay is the time delay between animation icons in milliseconds. The default time delay is 200 milliseconds.
Add the PUSH_ANIMATION and/or DROP_ANIMATION fields to the control definition. The value is the name of the ANIMATION sequence.
For example, the following lines animate a control that starts the BestEditor application. The time delay between icons is 300 milliseconds. The example assumes you've created icon files frame1, frame2, etc.
CONTROL BestEditor
{
…
PUSH_ANIMATION BestEdAnimation
…
}
ANIMATION BestEdAnimation
{
frame1 300
frame2
…
}