BitmapSprite: creating a sprite by loading a bitmap file

Note: This example is designed to work properly only with Techview, there is no guarantee that it will work properly with other interfaces.

Description

The BitmapSprite example creates an animated sprite by loading a bitmap (.mbm) file. The sprite is a rotating windmill which can be moved around the screen using the arrow keys.

As in the previous example, the sprite is created by setting up the sprite members to contain bitmaps, then appending them to the sprite. In this example, however, the bitmaps are loaded from a file rather than created using off-screen bitmaps drawn to using a graphics context.

Download

Click on the following link to download the example: BitmapSprite.zip

Click: browse to view the example code.

Classes defined

CSprite: Uses class RWsSprite by setting up the sprite members to contain bitmaps then appending them to the sprite. In this example, the bitmaps are loaded from a file.