- ani:start()
- ani:stop()
- ani:pause()
- ani:play([x, y])
SYNOPSIS
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()