2 # tutorial on Pins for the user.
4 .flash bbox=autocrop version=4 fps=25 name="Pins.swf"
7 .box box width=5 height=5 color=yellow
14 .circle pin 8 color=blue fill=blue
16 .font helv "HelveticaBold.swf"
18 .text mesg1 text="(1) This tutorial explains \"pins\" . . ." font=helv color=yellow size=100%
19 .text mesg2 text="(2) Every object such as this simple box ..." font=helv color=red size=100%
20 .text mesg3 text="(3) ... is \"pinned\" to a screen x,y." font=helv color=yellow size=100%
22 .text mesg4 text="(4) The yellow reticle is at 100,100..." font=helv color=yellow size=100%
23 .text mesg5 text="(5) The box's \"pin\" is at (relative to the box) 0,0." font=helv color=green size=100%
24 .text mesg6 text="(6) When we .put the box at 100,100, its pin lands..." font=helv color=blue size=100%
25 .text mesg7 text="(7) ... on 100,100." font=helv color=yellow size=100%
27 .text mesg8 text="(8) Relative 0,0 is the default pin." font=helv color=yellow size=100%
28 .text mesg9 text="(9) If we rotate the box..." font=helv color=red size=100%
29 .text mesg10 text="(10)... it rotates around its default pin" font=helv color=red size=100%
30 .text mesg11 text="(11) If we specify a special pin called \"center\"" font=helv color=red size=100%
31 .text mesg12 text="(12) the box center will be at 100,100..." font=helv color=red size=100%
32 .text mesg13 text="(13) and it will rotate in place." font=helv color=red size=100%
34 .text mesg14 text="(14) Interesting things will happen..." font=helv color=red size=100%
35 .text mesg15 text="(15) ... if a .change command moves the pin!" font=helv color=red size=100%
36 # .text mesg13 text="(16) and it will rotate in place." font=helv color=red size=100%
37 # .text mesg13 text="(17) and it will rotate in place." font=helv color=red size=100%
38 # .text mesg13 text="(18) and it will rotate in place." font=helv color=red size=100%
39 # .text mesg13 text="(19) and it will rotate in place." font=helv color=red size=100%
42 # oh no, we have to make zillions of these sprites... sigh...
45 .put mesg1 x=0 y=10 alpha=0 # mesg 1 placed
47 .change mesg1 alpha=100% # mesg 1 bright
49 .change mesg1 # mesg 1 hold
51 .change mesg1 alpha=0 # mesg 1 fade
53 .del mesg1 # mesg 1 gone
58 .put mesg2 x=0 y=10 alpha=0 # mesg 1 placed
60 .change mesg2 alpha=100% # mesg 1 bright
62 .change mesg2 # mesg 1 hold
64 .change mesg2 alpha=0 # mesg 1 fade
66 .del mesg2 # mesg 1 gone
71 .put mesg3 x=0 y=10 alpha=0 # mesg 1 placed
73 .change mesg3 alpha=100% # mesg 1 bright
75 .change mesg3 # mesg 1 hold
77 .change mesg3 alpha=0 # mesg 1 fade
79 .del mesg3 # mesg 1 gone
84 .put mesg4 x=0 y=10 alpha=0 # mesg 1 placed
86 .change mesg4 alpha=100% # mesg 1 bright
88 .change mesg4 # mesg 1 hold
90 .change mesg4 alpha=0 # mesg 1 fade
92 .del mesg4 # mesg 1 gone
97 .put mesg5 x=0 y=10 alpha=0 # mesg 1 placed
99 .change mesg5 alpha=100% # mesg 1 bright
101 .change mesg5 # mesg 1 hold
103 .change mesg5 alpha=0 # mesg 1 fade
105 .del mesg5 # mesg 1 gone
110 .put mesg6 x=0 y=10 alpha=0 # mesg 1 placed
112 .change mesg6 alpha=100% # mesg 1 bright
114 .change mesg6 # mesg 1 hold
116 .change mesg6 alpha=0 # mesg 1 fade
118 .del mesg6 # mesg 1 gone
123 .put mesg7 x=0 y=10 alpha=0 # mesg 1 placed
125 .change mesg7 alpha=100% # mesg 1 bright
127 .change mesg7 # mesg 1 hold
129 .change mesg7 alpha=0 # mesg 1 fade
131 .del mesg7 # mesg 1 gone
136 .put mesg8 x=0 y=10 alpha=0 # mesg 1 placed
138 .change mesg8 alpha=100% # mesg 1 bright
140 .change mesg8 # mesg 1 hold
142 .change mesg8 alpha=0 # mesg 1 fade
144 .del mesg8 # mesg 1 gone
149 .put mesg9 x=0 y=10 alpha=0 # mesg 1 placed
151 .change mesg9 alpha=100% # mesg 1 bright
153 .change mesg9 # mesg 1 hold
155 .change mesg9 alpha=0 # mesg 1 fade
160 .put mesg10 x=0 y=10 alpha=0 # mesg 1 placed
162 .change mesg10 alpha=100% # mesg 1 bright
164 .change mesg10 # mesg 1 hold
166 .change mesg10 alpha=0 # mesg 1 fade
171 .put mesg11 x=0 y=10 alpha=0 # mesg 1 placed
173 .change mesg11 alpha=100% # mesg 1 bright
175 .change mesg11 # mesg 1 hold
177 .change mesg11 alpha=0 # mesg 1 fade
182 .put mesg12 x=0 y=10 alpha=0 # mesg 1 placed
184 .change mesg12 alpha=100% # mesg 1 bright
186 .change mesg12 # mesg 1 hold
188 .change mesg12 alpha=0 # mesg 1 fade
193 .put mesg13 x=0 y=10 alpha=0 # mesg 1 placed
195 .change mesg13 alpha=100% # mesg 1 bright
197 .change mesg13 # mesg 1 hold
199 .change mesg13 alpha=0 # mesg 1 fade
204 .put mesg14 x=0 y=10 alpha=0 # mesg 1 placed
206 .change mesg14 alpha=100% # mesg 1 bright
208 .change mesg14 # mesg 1 hold
210 .change mesg14 alpha=0 # mesg 1 fade
215 .put mesg15 x=0 y=10 alpha=0 # mesg 1 placed
217 .change mesg15 alpha=100% # mesg 1 bright
219 .change mesg15 # mesg 1 hold
221 .change mesg15 alpha=0 # mesg 1 fade
224 .box box1 width=100 height=100 color=red line=5 # a simple red box
227 .put m1 0 0 # at rel frame 20 is the bright spot, or "next" frame
228 .put box1 x=100 y=100 alpha=0
229 .frame 20 # *** slide 1
231 .change box1 alpha=100% # box bright
236 .change box1 # box hold
239 .jump box1 alpha=100% # make the box appear suddenly and leap around a bit
242 .jump box1 x+=20 y+=20 # why doesn't this work?
246 .jump box1 x-=20 y-=20
248 .jump box1 x=100 y=100 # put box bck where it belongs
250 .jump box1 x-=20 y-=15
252 .jump box1 x+=20 y+=40
254 .jump box1 x=100 y=100
256 .put pin 100 100 alpha=0 pin=center # pin placed (dark, bottom layer)
257 .put reticle 100 100 alpha=0 pin=center # place reticle (dark, top layer)
260 .change box1 alpha=0 # box fade
261 .change reticle alpha=100% # reticle bright
265 .change reticle # hold reticle
267 .change reticle alpha=0 # reticle dark
268 .change pin # hold that pin
269 .change box1 # hold that box
275 .change box1 alpha=100% # box bright
277 .change pin alpha=100% # pin bright
280 .jump pin blue=0 red=+100% # blink the pin!
284 .jump pin blue=100% red=0
286 .jump pin blue=0 red=+100%
288 .jump pin blue=100% red=0
290 .jump pin blue=0 red=+100%
292 .jump pin blue=100% red=0
294 .jump pin blue=0 red=+100%
296 .jump pin blue=100% red=0
298 .change reticle # hold that reticle!
299 .jump pin blue=0 red=+100%
301 .jump pin blue=100% red=0
304 .change reticle alpha=100%
318 .change box1 rotate+=90
322 .change box1 rotate-=90
331 .change box1 x=100 y=100 pin=center
333 .jump pin blue=100% red=0
335 .jump pin blue=0 red=+100%
337 .jump pin blue=100% red=0
340 .jump pin blue=0 red=+100%
344 .jump pin blue=100% red=0
346 .jump pin blue=0 red=+100%
348 .jump pin blue=100% red=0
353 .change box1 rotate+=90 pin=center
357 .change box1 rotate-=90
360 .change box1 pin=(0,0) x=100 y=100
365 .change box1 pin=center rotate+=90
370 .change box1 pin=(0,0) rotate-=90