2 # tutorial on Pins for the user.
4 .swf 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=25%
19 .text mesg2 text="(2) Every object such as this simple box ..." font=helv color=red size=25%
20 .text mesg3 text="(3) ... is \"pinned\" to a screen x,y." font=helv color=yellow size=25%
21 .text mesg4 text="(4) The yellow reticle is at 100,100..." font=helv color=yellow size=25%
22 .text mesg5 text="(5) The box's \"pin\" is at (relative to the box) 0,0." font=helv color=green size=25%
23 .text mesg6 text="(6) When we .put the box at 100,100, its pin lands..." font=helv color=blue size=25%
24 .text mesg7 text="(7) ... on 100,100." font=helv color=yellow size=25%
26 .text mesg8 text="(8) Relative 0,0 is the default pin for placement." font=helv color=yellow size=25%
27 .text mesg9 text="(9) If we rotate..." font=helv color=red size=25%
29 .box box1 width=100 height=100 color=red line=5 # a simple red box
32 .put mesg1 x=0 y=10 # mesg1 bright
33 .put box1 x=100 y=100 alpha=0
35 .change mesg1 # mesg 1 hold
37 .change mesg1 alpha=0 # mesg 1 fade
38 .put mesg2 x=0 y=10 alpha=0 # mesg 2 placed (new message placed during old fade)
40 .del mesg1 # mesg 1 gone
41 .change mesg2 alpha=100% # MESG 2 bright *** a "slide" lasts 40 frames
42 .change box1 alpha=100% # box bright
44 .change mesg2 # mesg 2 hold
45 .change box1 # box hold
46 .change box1 alpha=0 # box fade
48 .change mesg2 alpha=0 # mesg 2 fade
49 .put mesg3 x=0 y=10 alpha=0 # mesg 3 placed
51 .del mesg2 # mesg 2 gone
52 .change mesg3 alpha=100% # mesg 3 bright ***
53 .jump box1 alpha=100% # make the box appear suddenly and leap around a bit
55 .jump box1 x+=20 y+=20 # BUG? why doesn't this work? am I confused?
57 .jump box1 x-=20 # shouldn't the box be dancing around the screen?
59 .jump box1 x-=20 y-=20
61 .change mesg3 # mesg 3 hold
62 .jump box1 x=100 y=100 # put box bck where it belongs
64 .change mesg3 alpha=0 # mesg 3 fade
65 .put mesg4 x=0 y=10 alpha=0 # mesg 4 placed
66 .put pin 100 100 alpha=0 pin=center # pin placed (dark, bottom layer)
67 .put reticle 100 100 alpha=0 pin=center # place reticle (dark, top layer)
68 .change box1 alpha=0 # box fade
70 .del mesg3 # mesg 3 gone
71 .change mesg4 alpha=100 # mesg 4 bright ***
72 .change reticle alpha=100% # reticle bright
74 .change mesg4 # mesg 4 hold
75 .change reticle # hold reticle
77 .change mesg4 alpha=0 # mesg 4 fade
78 .put mesg5 x=0 y=10 alpha=0 # mesg 5 placed
79 .change reticle alpha=0 # reticle dark
81 .del mesg4 # mesg 4 gone
82 .change mesg5 alpha=100% # mesg 5 bright ***
83 .change box1 alpha=100% # box bright
84 .change pin alpha=100% # pin bright
86 .change mesg5 # mesg 5 hold
88 .change mesg5 alpha=0 # mesg 5 fade
89 .put mesg6 x=0 y=10 alpha=0 # mesg 6 placed
91 .del mesg5 # mesg 5 gone
92 .change mesg6 alpha=100% # mesg 6 bright ***
93 .jump pin blue=0 red=+100% # blink the pin
95 .jump pin blue=100% red=0
97 .jump pin blue=0 red=+100%
99 .jump pin blue=100% red=0
101 .change mesg6 # mesg 6 hold
103 .change mesg6 alpha=0 # mesg 6 fade
104 .put mesg7 x=0 y=10 alpha=0 # mesg7 placed
105 .change reticle # hold that reticle!
107 .change mesg7 alpha=100% # mesg7 bright ***
108 .change reticle alpha=100%
110 .change mesg7 # mesg 7 hold
112 .change mesg7 alpha=0 # mesg 7 fade
113 .put mesg8 x=0 y=10 alpha=0 # mesg 8 placed
115 .del mesg7 # mesg 7 gone
116 .change mesg8 alpha=100% # mesg 8 bright ***
118 .change mesg8 # mesg 8 hold
120 .change mesg8 alpha=0 # mesg 8 fade
122 .del mesg8 # mesg 8 gone
129 # .put mesg6 x=0 y=10 alpha=0 # mesg 6 placed
130 # .change mesg6 alpha=100% # mesg 6 bright
131 # .change mesg6 # mesg 6 hold
132 # .change mesg6 alpha=0 # mesg 6 fade
133 # .del mesg6 # mesg 6 gone