Home Contents | # Animation Playback Control | Graphics | Core4 Lua Commands

## SYNOPSIS

1. ani:start()
2. ani:stop()
3. ani:pause()
4. ani:play([x, y])

## DESCRIPTION

Methods for controlling playback of an animation player. Animation player instances are returned by the functions gcx:play or gcx:player.

ani:start() | Starts playing the animation. If it is already playing, does nothing. A paused animation continues.
ani:stop() | Stops the animation and returns the screen contents to the state before the animation was started.
ani:pause() | Pauses the animation. Playing stops dead in its tracks, with the last frame painted left visible on the screen.
ani:play([x, y]) | Starts playing the animation. If it is already playing, it is stopped and restarted at the new coordinates. If coordinates are not given, uses 0, 0.

## ERRORS

Raises an error if ani is not an animation player.

## EXAMPLE

> > > > > >
fb = gfx.open() img = fb:load("/media/mmc0a/throbber.gif") ani = img:player() ani:play(69, 105) -- Do other things ani:stop()

## SEE ALSO

#ani, ani:close, ani:isplaying, gcx:play, gcx:player