X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=doc%2Fswfc.xml;fp=doc%2Fswfc.xml;h=bd1176e959ac7315e2d36ec92c75e204df72b04b;hb=c2b431306dc202edd5c7d59cc8ddb784fe66caeb;hp=0000000000000000000000000000000000000000;hpb=a327d407b80932c733bf617d819ce7f054b2e6bb;p=swftools.git diff --git a/doc/swfc.xml b/doc/swfc.xml new file mode 100644 index 0000000..bd1176e --- /dev/null +++ b/doc/swfc.xml @@ -0,0 +1,187 @@ + + + +SWFC Manual + + +swfc is a tool for generating flash files. You can write small simple scripts +and then have them compiled to SWF Flash Animations. + + + + + +swfc Basics + +
Calling swfc + +

+ + swfc is command line based. You call it via + + $ swfc file.sc + + The filename of what is generated depends on the filename of the script (file.sc), + the filename given inside the script, and the optional -o passed to swfc. + +

+ + + Though swfc is a command-line utility, there also exists a nice graphical + frontend for it, called Swifty. + + +
+ +
A simple swfc example + +

+ Let's create simple SWF file, shall we? + The following script creates a red box with a yellow border. On the right side you + see the script used, on the left side the swf file that is generated. +

+ + +.swf name="box.swf" + .box b1 100 100 color=yellow fill=red + .put b1 pin=center scale=0% + .frame 100 + .change b1 pin=center scale=100% + .frame 200 + .change b1 pin=center scale=0% +.end + + + The .box command creates the box. Every object that is created must also be explicitly + put into the scene using .put to become visible. + +
+ +
Text generation + + +.swf name="text5.swf" +.font courier "Courier.swf" +.font helvetica "Helvetica.swf" +.text hithere text="HELLO" font=courier size=50% color=blue +.shape scene Scenery50.swf + +.frame 0 + .startclip hithere pin=center x=100 y=75 scale=50% #text clips... + .put scene # ...the image "scene" + .end +.frame 100 + .change hithere rotate+=360 pin=center scale=100% + +.end + + + +.swf name="text6.swf" +.font courier "Courier.swf" +.font helvetica "Helvetica.swf" +.text hello text="HELLO" font=helvetica size=50% color=blue +.text world text="WORLD" font=helvetica size=50% color=red + +.frame 0 + .put hello pin=center x=50 y=50 + .put world pin=center x=50 y=50 alpha=25% +.frame 200 + .change hello rotate+=360 pin=center alpha=25% + .change world rotate-=360 pin=center alpha=100% +.end + + +
+ +
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 + + +
+ + +
+