LoadAnimation

From Spheriki

Jump to: navigation, search

Load an animation file into Sphere as an Animation object, which you can them subsequently manipulate and display on the screen.

If Sphere is unable to open the file, the engine will give an error message and exit. Sphere supports animation formats of .flic, .fli, .flc and .mng.


Usage

Animation LoadAnimation(filename);
  • filename The MNG file to load.


Examples

Load the file and display its first frame.

var ani = LoadAnimation("walkingdude.mng");
ani.drawFrame(10, 10);
FlipScreen();
GetKey();

See Object-Animation for an example on how to animate an object.


See also

Personal tools