X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=doc%2Fexamples%2Fclip.sc;fp=doc%2Fexamples%2Fclip.sc;h=febe23738139a3310b3a91dab4f0d1b5eddbf542;hb=d5a70ae785b504b8bb82379150b6e339240d5513;hp=0000000000000000000000000000000000000000;hpb=a984e3f36f2998ebf05446d4c4cf3574c03e210d;p=swftools.git diff --git a/doc/examples/clip.sc b/doc/examples/clip.sc new file mode 100644 index 0000000..febe237 --- /dev/null +++ b/doc/examples/clip.sc @@ -0,0 +1,29 @@ +# clipping.sc +# +# Test clipping + +.swf name="clip.swf" fps=25 + .sprite s1 # this just constructs a colorful object "s1" + .box b1 40 40 color=red fill=violet line=10 + .box b2 40 40 color=blue fill=green line=10 + .box b3 40 40 color=yellow fill=cyan line=10 + .box b4 40 40 color=white fill=black line=10 + .put b1 0 0 + .put b2 60 0 + .put b3 60 60 + .put b4 0 60 + .end + + # the line and fill colors of the circle don't actually do anything- + # as it's used for clipping only it's shape matters + .circle c1 80 color=blue fill=green + + .startclip c1 x=-160 y=-160 #c1 clips... + .put s1 # ...the sprite s1 + .end + +.frame 200 + .change c1 x=160 y=160 # movement doesn't change the clipping property + .change s1 rotate=5 + +.end