Refining the Project SECTION 2 Basic Tutorial
19
5. The runtime system starts with the page just created shown inside a frame
window.
6. Click the Toggle button and observe the button change state. The Green
light should change colour. When the button is clicked again, the Green
light reverts to its previous colour. Repeat this test a few more times to
observe the application in action. Notice that it really doesn't matter how
quickly or slowly the button is selected; the light can always keep up with
the changes.
Check the colour of the Green light. Is it changing correctly between the two
states? If not, check the colour definitions in the development environment.
2-6 Refining the Project
1, 2, 3… 1. Exit the Runtime environment. From the Control menu, select Close, or
Right Click and select Exit.
2. In the development environment, select the Green light and then open the
Animation Editor dialog.
3. Once again, open the Colour Change (Digital) dialog box. The two colours
are shown at the bottom of the dialog box. If necessary, select the colour
and change its tone by using the Colour Palette dialog.
4. Select the Red light and animate this in the same manner as for the Green
light.
Remember that with the traffic signal, the red light needs to be 'ON', that
is, bright-red when 'GO' is false (State 0), and dark-red or grey when 'GO'
is true (State 1), indicating the bulb is not illuminated.
Otherwise the traffic signal should be working as expected - changing from red
to green as the button is pressed. On alternate selections, the signal should
change back from green to red.
Any problems can be rectified by refining the project and re-running the
application.
Try runtime once again. From the toolbar, click the Run button and try out the
new tutor application; this time both lights should change colour as the button
is selected. If both lights go on and off together then check, and possibly,
change the colour definitions as described above.