---
name: "fli_frame"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/fli_frame"
---

# fli\_frame(3alleg)

Stores the current frame number of the animation. Allegro game programming library.

## NAME

fli\_frame - Stores the current frame number of the animation. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**extern int fli\_frame;**

## DESCRIPTION

Global variable containing the current frame number in the FLI file. This  is useful for synchronising other events with the animation, for instance  you could check it in a play\_fli() callback function and use it to  trigger a sample at a particular point. Example:

```
   while (next_fli_frame(0) == FLI_OK) {
      if (fli_frame == 345)
         play_sample(trumpet_sound, 255, 128, 1000, 0);
      /* Rest some time until next frame... */
   }
```

## SEE ALSO

[**play\_fli**(3alleg)](/play_fli/3alleg.md), [**play\_memory\_fli**(3alleg)](/play_memory_fli/3alleg.md), [**next\_fli\_frame**(3alleg)](/next_fli_frame/3alleg.md)
