File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 14
14
variable L
15
15
variable N
16
16
17
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18
+ ! Create the window and start the graphics
19
+
17
20
create window title `Mexican Wave` at 300 300 size 640 480 fill color 255 255 200
18
21
run graphics
19
22
23
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24
+ ! Define a set of 10 bars
25
+
20
26
put `{
21
27
` "#": [
22
28
` "Bar0",
33
39
`
34
40
`` into Spec
35
41
42
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
43
+ ! Create the specifications for each of the 10 barsm then render the spec
44
+
36
45
put 0 into N
37
46
while N is less than 10
38
47
begin
59
68
60
69
render Spec
61
70
71
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
72
+ ! Attach a script variable to each of the 10 bars
73
+
62
74
divide the window height by 2 giving Mid
63
75
multiply Mid by 9 giving Range
64
76
divide Range by 10
75
87
increment N
76
88
end
77
89
90
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
91
+ ! This section animates the bars growing up fro the bottom of the screen
92
+
78
93
wait 1
79
- ! Run the setup
80
94
put 0 into N
81
95
while N is less than 10
82
96
begin
96
110
set attribute `height` of Bar to Height
97
111
increment N
98
112
end
113
+ on click Bar print `Click ` cat the index of Bar
114
+ end
99
115
116
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
117
+ ! This section runs the main animation
100
118
wait 1
101
- ! Run the main animation
102
119
while true
103
120
begin
104
121
put 0 into N
You can’t perform that action at this time.
0 commit comments