| 1 |
### START SCRIPT ### |
| 2 |
|
| 3 |
demo Select inner viewport: 0, 100, 0, 100 |
| 4 |
demo Axes: 0, 100, 0, 100 |
| 5 |
|
| 6 |
# Present red screen: |
| 7 |
label START |
| 8 |
demo Erase all |
| 9 |
demo Paint rectangle: "Maroon", 0, 100, 0, 100 |
| 10 |
demoShow() |
| 11 |
|
| 12 |
# Delay the red screen by 0.5 sec: |
| 13 |
Create Sound from formula... delay 1 0 0.5 1000 0 |
| 14 |
Play |
| 15 |
Remove |
| 16 |
|
| 17 |
# Present green screen with buttons: |
| 18 |
demo Erase all |
| 19 |
demo Paint rectangle: "Green", 0, 100, 0, 100 |
| 20 |
demo Black |
| 21 |
demo Paint rounded rectangle... silver 40 60 5 10 3 |
| 22 |
demo Text special... 50 centre 7.5 half Helvetica 20 0 repeat |
| 23 |
demo Paint rounded rectangle... silver 93 98 2 8 3 |
| 24 |
demo Text special... 95.5 centre 4.5 half Helvetica 15 0 EXIT |
| 25 |
demoShow() |
| 26 |
|
| 27 |
# Get user input: |
| 28 |
while demoWaitForInput () |
| 29 |
if demoClickedIn (40, 60, 5, 10) |
| 30 |
goto START |
| 31 |
elsif demoClickedIn (93, 98, 2, 8) |
| 32 |
goto END |
| 33 |
endif |
| 34 |
endwhile |
| 35 |
|
| 36 |
label END |
| 37 |
demo Erase all |
| 38 |
|