At this step, we will spin the background cube . This application is implemented by modifying the result of previous step. This page introduces the periodic timer geometry in secnes to add motions in 3D applications.
Following is the result of this step. Try “RUN”. You can see spinning cube at the background of the green “HELLO WOLRD” text. To stop this application, Press “STOP” button below the 3D view added by the result of this step. STOP button terminates this application normally. Break button is also still effective but this is aborting this application.
STEP 1. Loading previous application.
Load the result of Page 0050 thru LOAD/SAVE tab.
STEP 2. Add New button.
Selecting “GEO EDITOR” tab on the top of VPGL UI displays 3D Geometry Editor, choose “AppMain” scene, then select “Add New Item”.

Then set “AppCtrl” as new item name.

You can change the this item type from “Box” to “button”. button is UI button item which is displayed outside of the view.

button item has a “Text” property as a label of button. It is possible to set the neme of button different from item name. In this case, AppCtrl button is labelled as “STOP”

STEP 3 Set Event Handler
Redifine INIT of App class as follows to capture STOP button pressing.

Where each options are :
GEO at B2 : { ‘Scene’ : ‘AppMain’ ‘Geo’ : ‘Tact’ }
GEO at B3 : { ‘Scene’ : ‘AppMain’ ‘Geo’ : ‘AppCtrl’ }
ATTACH at C2 : { ‘evt’ : ‘OnTick’ ‘msg’ : ‘OnTick’ }
ATTACH at C3 : { ‘evt’ : ‘OnClick’ ‘msg’ : ‘AppStop’ }
Redefintion of INIT makes this application so that Pressing AppCtrl button invokes AppStop method of App class application object. Thus we must define AppStop method in next step.
STEP 4 Define AppStop Method.
AppStop simply invokes STOP, like follows.

STOP terminates application normally and immediately.
STEP 5. Try Run.
After save your work, try “RUN” button. You’ve got a success if you can see the same result as the example at the top of this page.
STEP 6 Go to Block Buster track.
Now you are get ready to start Building Block Buster game track.