The OnTimer() function is called 30 times per second to allow changes to be made to create animation. A DragonFireSDK program must have one function named OnTimer(). Additionally, DragonFireSDK programs must have AppMain() and AppExit() functions.
Required function starting with DragonFireSDK 1.0.
Description: This program will move the image 2 pixels once each frame (30 times per sec).
Ballx = 0;
Bally = 0;
BallImage = ImageAdd("Ball.png"); // load an image
BallView = ViewAdd(BallImage, Ballx, Bally); // show the image on the screen
Ballx += 2;
ViewSetxy(BallView, Ballx, Bally); // modify the x,y position of the view