2 # tutorial on Pins for the user.
4 .swf bbox=autocrop version=4 fps=25 name="PinsTutorial.swf"
9 .box box width=5 height=5 color=yellow
18 .circle pin 8 color=blue fill=blue
20 .font helv "HelveticaBold.swf"
22 .text mesg1 text="(1) This tutorial explains \"pins\" . . ." font=helv color=yellow size=25%
23 .text mesg2 text="(2) Every object such as this simple box ..." font=helv color=magenta size=25%
24 .text mesg3 text="(3) ... is \"pinned\" to a screen x,y." font=helv color=cyan size=25%
26 .text mesg4 text="(4) The yellow reticle is at 100,100..." font=helv color=red size=25%
27 .text mesg5 text="(5) The box's \"pin\" is at (relative to the box) 0,0." font=helv color=green size=25%
28 .text mesg6 text="(6) When we .put the box at 100,100, its pin lands..." font=helv color=blue size=25%
29 .text mesg7 text="(7) ... on 100,100." font=helv color=magenta size=25%
31 .text mesg8 text="(8) Relative 0,0 is the default pin." font=helv color=yellow size=25%
32 .text mesg9 text="(9) If we rotate the box..." font=helv color=red size=25%
33 .text mesg10 text="(10)... it rotates around its default pin" font=helv color=blue size=25%
34 .text mesg11 text="(11) If we specify a special pin called \"center\"" font=helv color=green size=25%
35 .text mesg12 text="(12) the box center will be at 100,100..." font=helv color=yellow size=25%
36 .text mesg13 text="(13) and it will rotate in place." font=helv color=cyan size=25%
38 .text mesg14 text="(14) Interesting things will happen if we rotate..." font=helv color=magenta size=25%
39 .text mesg15 text="(15) ... while a .change command moves the pin!" font=helv color=green size=25%
40 .text mesg16 text="(16) The pin is also relevant when scaling." font=helv color=blue size=25%
41 .text mesg17 text="(17) Scaling takes place relative to the fixed pin." font=helv color=red size=25%
42 .text mesg18 text="(18) It's important to know where your pin is!" font=helv color=white size=25%
43 # .text mesg19 text="(19) and it will rotate in place." font=helv color=red size=25%
49 .box box1 width=100 height=100 color=red line=5 # a simple red box
52 .macro tfader 0,10 mesg1
53 .put box1 x=100 y=100 alpha=0
54 .frame n+=20 # *** slide 1
55 .change box1 # hold that box
57 .change box1 alpha=100% # box bright
58 .macro tfader 0,10 mesg2
60 .change box1 # box hold
62 .jump box1 x=120 y=120 # why doesn't this work?
64 .jump box1 x=60 y=120 # why doesn't this work?
66 .macro tfader 0,10 mesg3
67 .jump box1 # make the box appear suddenly and leap around a bit
69 .jump box1 x=100 y=100 # why doesn't this work?
73 .jump box1 x-=20 y-=20
75 .jump box1 x=100 y=100 # put box bck where it belongs
77 .jump box1 x-=20 y-=15
79 .jump box1 x+=20 y+=40
81 .jump box1 x=100 y=100
83 .put pin 100 100 alpha=0 pin=center # pin placed (dark, bottom layer)
84 .put reticle 100 100 alpha=0 pin=center # place reticle (dark, top layer)
86 .macro tfader 0,10 mesg4
87 .change box1 alpha=0 # box fade
88 .change reticle alpha=100% # reticle bright
90 .change reticle # hold reticle
92 .change reticle alpha=0 # reticle dark
93 .change pin # hold that pin
94 .change box1 # hold that box
96 .macro tfader 0,10 mesg5
98 .change box1 alpha=100% # box bright
100 .change pin alpha=100% # pin bright
102 .macro tfader 0,10 mesg6
103 .jump pin blue=0 red=+100% # blink the pin!
105 .jump pin blue=100% red=0
107 .jump pin blue=0 red=+100%
109 .jump pin blue=100% red=0
111 .jump pin blue=0 red=+100%
113 .jump pin blue=100% red=0
115 .jump pin blue=0 red=+100%
117 .jump pin blue=100% red=0
119 .change reticle # hold that reticle!
120 .jump pin blue=0 red=+100%
122 .jump pin blue=100% red=0
124 .macro tfader 0,10 mesg7
125 .change reticle alpha=100%
127 .macro tfader 0,10 mesg8
131 .macro tfader 0,10 mesg9
133 .change box1 rotate+=90
135 .macro tfader 0,10 mesg10
137 .change box1 rotate-=90
140 .macro tfader 0,10 mesg11
143 .change box1 x=100 y=100 pin=center
145 .jump pin blue=100% red=0
147 .jump pin blue=0 red=+100%
149 .jump pin blue=100% red=0
151 .macro tfader 0,10 mesg12
152 .jump pin blue=0 red=+100%
154 .jump pin blue=100% red=0
156 .jump pin blue=0 red=+100%
158 .jump pin blue=100% red=0
162 .macro tfader 0,10 mesg13
163 .change box1 rotate+=90 pin=center
165 .change box1 rotate-=90
167 .macro tfader 0,10 mesg14
168 .change box1 pin=(0,0) x=100 y=100
170 .macro tfader 0,10 mesg15
171 .change box1 pin=center rotate+=90
173 .change box1 pin=(0,0) rotate-=90
174 .macro tfader 0,10 mesg16
176 .change box1 scale=50%
178 .change box1 scale=100%
180 .change box1 pin=center
182 .macro tfader 0,10 mesg17
184 .change box1 scale=50%
186 .change box1 scale=100% alpha=0
188 .macro tfader 0,10 mesg18
189 .jump pin blue=0 red=+100%
191 .jump pin blue=100% red=0
193 .jump pin blue=0 red=+100%
195 .jump pin blue=100% red=0