# Inline FLI/FLC- player in JAVA

| This is a demonstration of an inline player for FLI/FLC files. It is written as JAVA APPLET and works in 3 steps: Loading and parsing of the FLI/FLC-files; Reconstruction of the single frames; Playing of the frames as animation in a thread;

Perhaps it works a little jerky at the beginning. After that the animation will be played smoothly.

The advantages in comparision to loading a sequence of single GIFs:

- Less demand for memory at server side;
- Better handling;
- A smaller amount of transfer data;
- It isn't necessary to establish a connection for each frame which decreases the loading time.

The disadvantages are:

- An additional effort for decoding at the client side;
- FLI/FLC isn't actually a standard (MPEG or H.261 would be better);

New See also: The inline MPEG - player in JAVA

FLI/FLC files can be produced from a sequence of images (perhaps with some indirections) by means of the following tools:

- DTA and DTAX (MS-DOS),
- fbm2fli (UNIX)

Eventually the structure of this JAVA APPLET can serve as a basis for an inline MPEG player or an inline H.261 player. But you must take into account that the effort of decoding will be still higher. Because of this you will possibly wait longer for the animation.

To use the FLI/FLC player place a text like this on your web page:

    	<APPLET CODE="Flic_Player.class" WIDTH=410 HEIGHT=310>
    	<PARAM NAME=FILENAME VALUE="myfile.flc">
    	<PARAM NAME=DELAY VALUE=40>
    	</APPLET>

The (optional) parameter "DELAY" describes the delay (in ms) between 2 images during animation default: 200.

Known problems:

- Problems may occur if the "DELAY" parameter is to small.
- Depending on the operating system, the computer hardware and/or the web browser to big FLI/FLC files are played jerky.
- Depending on the operating system, the computer hardware and/or the web browser the web browser crashes (although it is actually impossible/LINUX).

And here is the source.

J.Anders,
TU-Chemnitz-Zwickau