This example is a UI application, which demonstrates how to create and play basic and sprite animations. It implements all the standard classes required by any application using UI controls such as an application, a document, an application UI and a view.
The application provides UI controls to create a sprite animation and a basic client-side animation. It also provides UI controls to control the behavior of an animation such as, start, stop, pause, resume and move.
The application plays an animated .gif
file
both as a basic client-side animation and a server-side sprite animation.
It performs the following tasks in the order they are listed to create
the basic and sprite animations:
Creates an object
of the CICLAnimationDataProvider
class.
Loads the animated .gif
file into the object.
Configures the animation to play in an infinite loop using TAnimationConfig.
Creates objects
of CBasicAnimation
and CSpriteAnimation
classes by passing the data provider object as an argument.
Starts animations with the TAnimationConfig object as an argument.
Once both the animations are started, the window server will
automatically draw the animations onto the window by calling the Draw()
method.
Click on the following link to download the example: AnimExample.zip
Click: browse to view the example code.
The Symbian platform build process describes how to build an
application. But, use abld export
command before abld build
to copy the animated .gif
file to RAM (C:\
drive) of the target platform.
The AnimExample builds an executable called AnimExample.exe
in the standard location (\epoc32\release\winscw\
udeb or urel for CodeWarrior). Either launch the executable
or launch the emulator and then select the AnimExample application
from the Emulator's extras bar.