Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

To Animate a Control

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:

  1. Specify the animation sequence using the ANIMATION component:

    	ANIMATION animation_name
     	{
     		icon_image				[delay]
     		icon_image				[delay]
     		...
     	}

    where delay is the time delay between animation icons, in milliseconds.

  2. 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
     	...
     }