Playing a graphic animationΒΆ

AnimatePlay()

Play a graphic animation


SYNTAX

AnimatePlay(graphic_id [, ntimes [, first_frame [, last_frame]]])

Play an animated graphic.

graphic_id

The identifier of the graphic to be played. The graphic is defined as +|- graphic graphic_id, and must be allocated the type clause GT_ANIMATE and an image clause which must be a .avi file without sound.

ntimes

The number of times the graphic is to be played. May be omitted. The default is to play the animation continuously (the value for this is -1). The AnimateStop function may be used to stop a continuous animation.

first_frame
last_frame

If included, these values specify the first and last frame to be included each time the animation is played. Frame numbering starts at 0, with the last frame being allocated the special number -1. The default values for first_frame and last_frame are 0 and -1 respectively (play all frames).

The program continues to execute while animations are playing.

The demo program $SCULPTOR/demo/misc/wintest.f includes an animated graphic.


EXAMPLE

+graphic SClogo at 230,56 {
     image = "$SCULPTOR/avi/sculptor.avi"
     type = GT_ANIMATE
}

     AnimatePlay(SClogo, -1, 0, 20)

RELATED TOPICS

Graphics

Animated graphics

AnimateStop()