# Animation Control

toolslib\custctrl\animate.fp

This instrument driver provides functions for creating and manipulating animation controls.

An animation control is a picture ring that automatically advances through its pictures. You can use animation control attributes to configure the rate at which the pictures are displayed and the size and position of each picture.

If an animation control has a callback function, then the callback function is sent two types of events specific to the animation control. The following list describes these events:

- EVENT_ANIMATE_PRE_FRAME
  This event is sent to the animation control callback before a frame is advanced. eventData1 is equal to the index of the currentFrame, and eventData2 is equal to the index of the newFrame. Return a nonzero value from the callback to prevent the animation control from advancing.
- EVENT_ANIMATE_POST_FRAME
  This event is sent to the animation control callback after advancing to the next frame in the sequence. eventData1 is equal to the index of the currentFrame, and eventData2 is equal to the index of the newFrame.

The functions in this instrument driver are multi-threaded safe.