fixed syntax.
[swftools.git] / doc / examples / clip.sc
1 # clipping.sc
2 #
3 # Test clipping
4
5 .flash name="clip.swf" fps=25
6     .sprite s1 # this just constructs a colorful object "s1"
7         .box b1 40 40 color=red fill=violet line=10
8         .box b2 40 40 color=blue fill=green line=10
9         .box b3 40 40 color=yellow fill=cyan line=10
10         .box b4 40 40 color=white fill=black line=10
11         .put b1 0 0
12         .put b2 60 0
13         .put b3 60 60
14         .put b4 0 60
15     .end
16
17     # the line and fill colors of the circle don't actually do anything-
18     # as it's used for clipping only it's shape matters
19     .circle c1 80 color=blue fill=green
20
21     .startclip c1 x=-160 y=-160 #c1 clips...
22         .put s1  # ...the sprite s1
23     .end
24
25 .frame 200
26     .change c1 x=160 y=160 # movement doesn't change the clipping property
27     .change s1 rotate=5
28
29 .end