these tutorials need to be built with expandsc before swfc'ing
[swftools.git] / doc / examples / MoveTutorial.sc
1 # Moves.sc
2 # tutorial on types of Moves for the user.
3
4 .swf bbox=autocrop version=4 fps=25 name="MoveTutorial.swf"
5
6 # SPRITES
7
8 .sprite reticle
9         .box box width=5 height=5 color=yellow
10         .put b1=box 0 0
11         .put b2=box 5 0
12         .put b3=box 0 5
13         .put b4=box 5 5
14 .end
15 #
16 # CHARACTERS
17 #
18 .shape axes axesClip.swf
19 .circle pin 8 color=blue fill=blue
20 #
21 .font helv "HelveticaBold.swf"
22 #
23 .text mesg1 text="(1) This tutorial demonstrates object motions." font=helv color=yellow size=25%
24 .text mesg2 text="(2) Every object can be animated in coordinate space." font=helv color=red size=25%
25 .text mesg3 text="(3) Let's examine each type of motion." font=helv color=yellow size=25%
26 #
27 .text mesg4 text="(4) It can translate in x..." font=helv color=yellow size=25%
28 .text mesg5 text="(5) ... it can translate in y ..." font=helv color=green size=25%
29 .text mesg6 text="(6) or both." font=helv color=blue size=25%
30 .text mesg7 text="(7) It can rotate." font=helv color=yellow size=25%
31 #
32 .text mesg8 text="(8) It can scale in x ..." font=helv color=yellow size=25%
33 .text mesg9 text="(9) ... it can scale in y ..." font=helv color=red size=25%
34 .text mesg10 text="(10)... or both." font=helv color=red size=25%
35 .text mesg11 text="(11) It can shear positively ..." font=helv color=red size=25%
36 .text mesg12 text="(12) ... or negatively." font=helv color=red size=25%
37 .text mesg13 text="(13) By combining these motions ..." font=helv color=red size=25%
38 #
39 .text mesg14 text="(14) ... you can produce various illusions ..." font=helv color=red size=25%
40 .text mesg15 text="(15) ... of depth and velocity." font=helv color=red size=25%
41 # .text mesg13 text="(16) and it will rotate in place." font=helv color=red size=25%
42 # .text mesg13 text="(17) and it will rotate in place." font=helv color=red size=25%
43 # .text mesg13 text="(18) and it will rotate in place." font=helv color=red size=25%
44 # .text mesg13 text="(19) and it will rotate in place." font=helv color=red size=25%
45
46 .text annot1 text="Increasing X" font=helv color=yellow size=12%
47 .text annot2 text="Increasing Y" font=helv color=yellow size=12%
48
49 # MACROS
50
51 # MAIN
52
53 .box box1 width=100 height=100 color=red line=5     # a simple red box
54     
55 .frame 0  
56         .macro tfader 0,10 mesg1
57         .put box1 x=100 y=100 pin=center
58 .frame n+=30
59         .change box1                    # release that box
60 .frame n+=30                            # *** slide 1
61         .change box1 pin=center x=120 y=120 scale=75%
62 .frame n+=30
63         .change box1 pin=center x=150 y=150 rotate+=90 scale=100%
64         .macro tfader 0,10 mesg2
65 .frame n+=30
66         .change box1 shear=+1.5 pin=center 
67 .frame n+=30
68         .macro tfader 0,10 mesg3
69         .change box1 x=100 y=100 shear=0 pin=(0,0) 
70 .frame n+=60
71         .macro tfader 0,10 mesg4
72         .put axes x=20 y=20 scale=120%
73         .put annot1 x=30 y=50
74         .put annot2 x=30 y=70
75         .change box1 x=100 y=100 shear=0 pin=(0,0) rotate=0
76 .frame n+=20
77         .change box1 x+=50
78 .frame n+=20
79         .change box1 x-=50
80 .frame n+=20
81         .macro tfader 0,10 mesg5
82 .frame n+=20
83         .change box1 y+=50
84 .frame n+=20
85         .change box1 y-=50
86 .frame n+=20
87         .macro tfader 0,10 mesg6
88 .frame n+=30
89         .change box1 x+=100 y+=100
90         .change annot1 x=80
91         .change annot2 y=120
92 #       .change box1 x=100
93 .frame n+=30
94         .change box1 x-=50 y-=50
95         .macro tfader 0,10 mesg7                # it can rotate
96         .change annot1 alpha=0
97         .change annot2 alpha=0
98         .change axes alpha=0
99 .frame n+=2
100         .del annot1
101         .del annot2
102         .del axes
103 .frame n+=30
104         .change box1 rotate=180
105 .frame n+=30
106         .change box1 rotate=0
107         .macro tfader 0,10 mesg8                # it can scale in x
108 .frame n+=30
109         .change box1 scalex=50%
110 .frame n+=30
111         .change box1 scalex=100%
112         .macro tfader 0,10 mesg9                # or in y
113 .frame n+=30
114         .change box1 scaley=50%
115 .frame n+=30
116         .change box1 scaley=100%
117         .macro tfader 0,10 mesg10               # or both
118 .frame n+=30
119         .change box1 scale=50%
120 .frame n+=30
121         .change box1 scale=100%
122         .macro tfader 0,10 mesg11               # positive shear
123 .frame n+=30
124         .change box1 shear=+.5
125 .frame n+=30
126         .change box1 shear=0
127         .macro tfader 0,10 mesg12               # negative shear
128 .frame n+=30
129         .change box1 shear=-.5
130 .frame n+=30
131         .change box1 shear=0
132         .macro tfader 0,10 mesg13               # by combining
133 .frame n+=90
134         .change box1 pin=center x=200 y+=50 rotate=360 scale=25%
135 .frame n+=30
136         .macro tfader 0,10 mesg14               # we produce the illusion
137         .change box1 pin=center x=100 y=100 rotate=0 scale=100
138 .frame n+=2
139         .jump box1 shear=1.0 x+=4
140 .frame n+=18
141         .change box1 x+=80 shear=0
142 .frame n+=20
143         .change box1 x+=80 
144 .frame n+=5
145         .change box1 shear=-.5
146 .frame n+=5
147         .change box1 shear=0
148 .frame n+=2
149         .change box1 y+=5
150 .frame n+=2
151         .change box1 y-=5
152 .frame n+=2
153         .change box1 y+=5
154 .frame n+=2
155         .change box1 y-=5
156 .frame n+=60
157         .change box1 x-=150 y-=10 rotate=180 scalex=-100%
158 .frame n+=60
159         .change box1 pin=center rotate=0 scalex=100%
160 .frame n+=60
161         .macro tfader 0,10 mesg15               # of depth and velocity
162 .frame n+=60
163         .change box1 alpha=0
164
165 .end
166
167