extracted sc files from fileformat.sc -- these examples all work.
authorde <de>
Sat, 8 Feb 2003 06:08:55 +0000 (06:08 +0000)
committerde <de>
Sat, 8 Feb 2003 06:08:55 +0000 (06:08 +0000)
should we keep all the swfs they need with them -- fonts, images, etc?
how does the cvs server like binary files?

doc/examples/HoppingMonkey.sc [new file with mode: 0644]
doc/examples/StrobeShear.sc [new file with mode: 0644]
doc/examples/boxes.sc [new file with mode: 0644]
doc/examples/clip.sc [new file with mode: 0644]
doc/examples/cxform.sc [new file with mode: 0644]
doc/examples/fonts.sc [new file with mode: 0644]
doc/examples/multiMove.sc [new file with mode: 0644]
doc/examples/points.sc [new file with mode: 0644]
doc/examples/transparency.sc [new file with mode: 0644]

diff --git a/doc/examples/HoppingMonkey.sc b/doc/examples/HoppingMonkey.sc
new file mode 100644 (file)
index 0000000..78b7603
--- /dev/null
@@ -0,0 +1,26 @@
+# monkey.sc
+#
+
+.swf bbox=autocrop version=4 fps=50 name="HoppingMonkey.swf"
+
+    .shape island "island.swf"
+    .shape monkey "monkey4.swf"
+    .put island
+    .point leftfoot 45 177
+    .point rightfoot 138 177
+    .frame 0 .put monkey 160 160
+    .frame 20 .change monkey 160 160
+    .frame 30 .change monkey 160 122
+    .frame 35 .change monkey 160 112
+    .frame 40 .change monkey 160 122
+    .frame 50 .change monkey 160 160
+    
+    .frame 70 .change monkey 205 337 pin=leftfoot rotate=0 
+    .frame 90 .change monkey rotate=30
+    .frame 100 .change monkey rotate=30
+    .frame 120 .change monkey rotate=0
+    .frame 122 .change monkey 298 337 pin=rightfoot rotate=0
+    .frame 140 .change monkey rotate=-30
+    .frame 150 .change monkey rotate=-30
+    .frame 170 .change monkey rotate=0
+.end
diff --git a/doc/examples/StrobeShear.sc b/doc/examples/StrobeShear.sc
new file mode 100644 (file)
index 0000000..bbd5253
--- /dev/null
@@ -0,0 +1,45 @@
+# shear.sc
+#
+# Shearing
+
+.swf bbox=300x200:-30 name="StrobeShear.swf" fps=25
+    .font helvetica "Helvetica.swf"
+    .text text text="Shear" font=helvetica size=100% color=yellow
+.frame 0
+    .put t0=text y=150 alpha=0% shear=0
+    .put t1=text y=150 alpha=0% shear=1
+    .put t2=text y=150 alpha=0% shear=2
+    .put t3=text y=150 alpha=0% shear=3
+    .put t4=text y=150 alpha=0% shear=4
+    .put t5=text y=150 alpha=0% shear=5
+    .put t6=text y=150 alpha=0% shear=6
+    .put t7=text y=150 alpha=0% shear=7
+    .put t8=text y=150 alpha=0% shear=8
+    .put t9=text y=150 alpha=0% shear=9
+.frame 50
+    .change t0 alpha=40% shear=0
+    .change t1 alpha=40% shear=0
+    .change t2 alpha=40% shear=0
+    .change t3 alpha=40% shear=0
+    .change t4 alpha=40% shear=0
+    .change t5 alpha=40% shear=0
+    .change t6 alpha=40% shear=0
+    .change t7 alpha=40% shear=0
+    .change t8 alpha=40% shear=0
+    .change t9 alpha=40% shear=0
+.frame 100
+    .change t0 .change t1 .change t2 .change t3 .change t4
+    .change t5 .change t6 .change t7 .change t8 .change t9
+.frame 150
+    .change t0 alpha=0% shear=-9
+    .change t1 alpha=0% shear=-8
+    .change t2 alpha=0% shear=-7
+    .change t3 alpha=0% shear=-6
+    .change t4 alpha=0% shear=-5
+    .change t5 alpha=0% shear=-4
+    .change t6 alpha=0% shear=-3
+    .change t7 alpha=0% shear=-2
+    .change t8 alpha=0% shear=-1
+    .change t9 alpha=0% shear=-0
+.end
+
diff --git a/doc/examples/boxes.sc b/doc/examples/boxes.sc
new file mode 100644 (file)
index 0000000..ed1d88a
--- /dev/null
@@ -0,0 +1,24 @@
+# boxes.sc
+#
+# Do things with rectangles.
+
+.swf bbox=autocrop version=6 fps=50 name="boxes.swf" compress
+
+    .box box1 width=100 height=100 color=red fill #filled red box
+    .box box2 width=100 height=100 color=white    #white hollow frame
+    .box box3 width=100 height=100 color=green line=10 fill=blue #filled blue box, with thick green border
+    
+.frame 0  
+        .put box1 x=30 scalex=30
+        .put box2 x=30 scalex=30
+        .put box3 x=30 scalex=30
+.frame 100
+        .change box1 x+=300 scalex=100
+        .change box2 y+=300 scalex=100
+        .change box3 x+=300 y-=300 scalex=100
+.frame 150
+        .del box1
+        .del box2
+        .del box3
+.end
+
diff --git a/doc/examples/clip.sc b/doc/examples/clip.sc
new file mode 100644 (file)
index 0000000..febe237
--- /dev/null
@@ -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
diff --git a/doc/examples/cxform.sc b/doc/examples/cxform.sc
new file mode 100644 (file)
index 0000000..201c955
--- /dev/null
@@ -0,0 +1,24 @@
+# cxform.sc
+#
+# Try color transforms
+
+.swf name="cxform.swf" version=5
+    
+    .shape s1 "photo.swf"
+
+    .put s1 x=50 y=50 scalex=110 scaley=110
+    .frame 100
+    .change s1 x=0 y=0 scalex=210 scaley=210 red=-1+255 green=-1+255 blue=-1+255 #invert
+    .frame 200
+    .change s1 x=100 y=50 scalex=110 scaley=110 red=0 green=+0 blue=+0 #remove red
+    .frame 300
+    .change s1 x=0 y=0 scalex=210 scaley=210 red=+0 green=2 blue=-1+255 #amplify green, invert blue
+    .frame 400
+    .change s1 x=50 y=100 scalex=110 scaley=110 red=2-128 green=-2+255 blue=+0.7+40 #alien glow
+    .frame 500
+    .change s1 x=0 y=0 scalex=210 scaley=210 red=8-1024 green=8-1024 blue=8-1024 #palette reduce
+    .frame 600
+    .change s1 x=0 y=0 scalex=210 scaley=210 red=+0 green=+0 blue=+0 #back to normal
+    .frame 700
+    .change s1 x=105 y=105 scalex=0 scaley=0 luminance=0 #fadeout
+.end
diff --git a/doc/examples/fonts.sc b/doc/examples/fonts.sc
new file mode 100644 (file)
index 0000000..678a59d
--- /dev/null
@@ -0,0 +1,12 @@
+# fonts.sc
+#
+# fonts&text
+
+.swf name="fonts.swf"
+    .font courier "Courier.swf"
+    .font helvetica "Helvetica.swf"
+    .text abc text="abcdefghijklmnopqrstuvwxyz" font=courier size=100% color=blue
+    .text abc2 text="abcdefghijklmnopqrstuvwxyz" font=helvetica size=100% color=red
+    .put abc
+    .put abc2 y=200
+.end
diff --git a/doc/examples/multiMove.sc b/doc/examples/multiMove.sc
new file mode 100644 (file)
index 0000000..12c8238
--- /dev/null
@@ -0,0 +1,75 @@
+# shear.sc
+#
+# test shear
+
+.swf bbox=autocrop version=6 fps=50 name="multiMove.swf"  
+#
+.font helv "HelveticaBold.swf"
+#
+.text mesg1 text="I am just translating now" font=helv color=red size=50%
+.text mesg2 text="I am just shearing now" font=helv color=red size=50%
+.text mesg3 text="I am translating AND shearing now" font=helv color=yellow size=50%
+#
+.text mesg4 text="I am just rotating now" font=helv color=blue size=50%
+.text mesg5 text="I am translating and rotating now" font=helv color=green size=50%
+#
+.text mesg6 text="I am just rotating now" font=helv color=blue size=50%
+.text mesg7 text="I am shearing and rotating now" font=helv color=yellow size=50%
+#
+.text mesg8 text="I am now translating AND rotating AND shearing!" font=helv color=yellow size=50%
+.text mesg9 text="And now we are done." font=helv color=red size=50%
+
+.box box1 width=100 height=100 color=red line=5     # a simple red box
+    
+.frame 0  
+        .put box1 x=100 y=100 pin=center
+       .put mesg1 x=0 y=10
+.frame 50
+        .change box1 x+=100  pin=center
+.frame 100
+       .change box1 x-=100 pin=center
+       .del mesg1
+       .put mesg2 x=0 y=10
+.frame 150
+       .change box1 shear=1.0 pin=center
+.frame 200
+       .change box1 shear=0.0 pin=center
+       .del mesg2
+       .put mesg3  x=0 y=10
+.frame 250
+       .change box1 x+=100 shear=1.0 pin=center
+.frame 300
+       .change box1 x-=100 shear=0.0 pin=center
+       .del mesg3
+       .put mesg4  x=0 y=10
+.frame 350
+       .change box1 rotate+=180 pin=center
+.frame 400
+       .change box1 rotate-=180 pin=center
+       .del mesg4
+       .put mesg5  x=0 y=10
+.frame 450
+       .change box1 rotate+=180 x+=100 pin=center
+.frame 500
+       .change box1 rotate-=180 x-=100 pin=center
+       .del mesg5
+       .put mesg7 x=0 y=10
+.frame 550
+       .change box1 rotate+=180 shear=1.0 pin=center
+.frame 600
+       .change box1 rotate-=180 shear=0.0 pin=center
+       .del mesg7
+       .put mesg8 x=0 y=10
+.frame 650
+       .change box1 rotate+=180 x+=100 shear=1.0 pin=center
+.frame 700
+       .change box1 rotate-=180 x-=100 shear=0.0 pin=center
+       .del mesg8
+       .put mesg9 x=0 y=10
+.frame 750
+       .change mesg9 alpha=0
+       .change box1 alpha=0 scale=0
+
+
+.end
+
diff --git a/doc/examples/points.sc b/doc/examples/points.sc
new file mode 100644 (file)
index 0000000..5e4bdb5
--- /dev/null
@@ -0,0 +1,32 @@
+# points.sc
+#
+# Test points, pivots, pins
+
+.swf version=5 fps=20 name="points.swf"
+
+.box box 90 90 color=white fill=red line=5
+.point center 45 45
+.point corner1 0 0 
+.point corner2 90 0 
+.point corner3 90 90 
+.point corner4 0 90 
+
+.put b1a=box x=90 y=90 pin=center
+.put b1b=box x=90 y=90 pin=center alpha=50%
+# OR: .put b1=box x=90 y=90 pin=(45,45) rotate=0
+
+.put b2=box x=90 y=90 pin=corner1 alpha=75% blue=+128 red=0.2
+.put b3=box x=90 y=90 pin=corner2 alpha=75% blue=+128 red=0.2
+.put b4=box x=90 y=90 pin=corner3 alpha=75% blue=+128 red=0.2
+.put b5=box x=90 y=90 pin=corner4 alpha=75% blue=+128 red=0.2
+
+.frame 100
+.change b1a rotate-=720
+.change b1b rotate+=720
+.change b2 rotate+=360
+.change b3 rotate-=360
+.change b4 rotate+=360
+.change b5 rotate-=360
+
+.end
+
diff --git a/doc/examples/transparency.sc b/doc/examples/transparency.sc
new file mode 100644 (file)
index 0000000..7b9456e
--- /dev/null
@@ -0,0 +1,22 @@
+# transparency.sc
+#
+# Test transparency
+
+.swf bbox=200x200 version=5 fps=25 name="transparency.swf"
+
+.box box1 90 90 color=yellow fill=blue line=5
+.box box2 90 90 color=white fill=red line=5
+
+.put b1=box1 75 75 rotate=0
+.put b2=box1 75 75 rotate=90
+.put b3=box1 75 75 rotate=180
+.put b4=box1 75 75 rotate=270
+.put box2 30 30 alpha=100%
+.frame 300
+.change b1 rotate+=360
+.change b2 rotate+=360
+.change b3 rotate+=360
+.change b4 rotate+=360
+.change box2 alpha=0%
+.end
+