--- /dev/null
+all:
+ xsltproc guide.xsl swfc.xml > tmp.html
+ perl codebeautifier.pl < tmp.html > swfc.html
--- /dev/null
+BODY {
+ color: black;
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 1.0em;
+}
+
+.dochead {
+ margin-top: 1.5em;
+ font-size: 1.7em;
+ font-weight: bold;
+ color: #000000;
+}
+
+.chaphead {
+/* margin: 1.2em 14% 0.5em 3%; */
+ font-size: 1.3em;
+ font-weight: bold;
+ color: #0000ff;
+}
+
+.chapnum {
+ font-size: 0.8em;
+ font-weight: bold;
+ color: #0000ff;
+}
+
+.secthead {
+/* margin: 1.0em 14% 0.2em 4%;*/
+/* My suggested new color and size, to take the new subsections (level 3) into account.
+ color: #2545ee;
+ font-size: 1.1em;*/
+ color: #2020ff;
+ font-size: 1.4em;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica;
+ /*text-decoration: underline;*/
+}
+
+.subsecthead {
+/* margin: 1.0em 14% 0.2em 4%;*/
+ color: #6c6cff;
+ font-size: 1.2em;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica;
+/* text-decoration: underline; */
+}
+
+.subsubsecthead {
+/* margin: 1.0em 14% 0.2em 4%;*/
+ color: #303030;
+ font-size: 1.0em;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica;
+/* text-decoration: underline; */
+}
+
+a.highlight:link { color: #00ff00; text-decoration: none; }
+a.highlight:visited { color: #00ff00; text-decoration: none; }
+a.highlight:hover { color: #00ff00; text-decoration: underline; }
+a.highlight:active { color: #00ff00; text-decoration: underline; }
+
+a.menulink:link { color: #a0a0d0; text-decoration: none; }
+a.menulink:visited { color: #a0a0d0; text-decoration: none; }
+a.menulink:hover { color: #00ff00; text-decoration: underline; }
+a.menulink:active { color: #00ff00; text-decoration: underline; }
+
+a.oldlink:link { color: #9090c0; text-decoration: none; }
+a.oldlink:visited { color: #9090c0; text-decoration: none; }
+a.oldlink:hover { color: #00ff00; text-decoration: underline; }
+a.oldlink:active { color: #00ff00; text-decoration: underline; }
+
+a.altlink:link { color: #7a5ada; text-decoration: none; }
+a.altlink:visited { color: #5a3aba; text-decoration: none; }
+a.altlink:hover { color: #7a5ada; text-decoration: underline; }
+a.altlink:active { color: #7a5ada; text-decoration: underline; }
+
+
+.menu {
+ font-size: 0.75em;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica;
+ color: #cccccc;
+ padding-left: 1.0em;
+ padding-right: 1.0em;
+ padding-top: 0.5em;
+ padding-bottom: 0.75em;
+}
+
+.altmenu {
+ font-size: 0.65em;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica;
+ color: #000000;
+ padding-left: 1.0em;
+ padding-right: 1.0em;
+}
+
+.alttext {
+ font-size: 0.65em;
+ font-family: Verdana, Arial, Helvetica;
+ color: #000000;
+/* padding-left: 1.0em;
+ padding-right: 1.0em;*/
+}
+
+.infotab {
+ padding: 0.5em;
+ margin-top: 1.0em;
+ margin-left: 1.0em;
+ margin-bottom: 1.0em;
+}
+
+.infohead {
+ font-size: 0.7em;
+ font-family: Verdana, Arial, Helvetica;
+ padding-top: 0.2em;
+ padding-bottom: 0.2em;
+ padding-left: 1.0em;
+ margin-left: 1.0em;
+ color: #ffffff;
+ font-weight: bold;
+}
+
+.infosub {
+ margin-top: 0.25em;
+ margin-bottom: 0.15em;
+ margin-left: 0em;
+ margin-right: 0.5em;
+ padding: 0em;
+ font-weight: bold;
+}
+
+.infolist {
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ margin-left: 1.0em;
+ margin-right: 0.5em;
+ padding: 0em;
+ padding-top: 0.3em;
+}
+
+.infogfx {
+ padding: 0em;
+}
+
+.infotext {
+ font-size: 0.7em;
+ font-family: Verdana, Arial, Helvetica;
+ color: #320f61;
+ margin-left: 1.5em;
+ margin-right: 1.5em;
+}
+/*
+.chaphead {
+ margin: 1.2em 14% 0.5em 3%;
+ font-size: 1.6em;
+ font-weight: bold;
+}
+*/
+.copyright {
+ padding-left: 1.0em;
+ padding-right: 1.0em;
+ margin: 0em 0% 0.2em 0%;
+ font-size: 0.7em;
+ font-family: Verdana, Arial, Helvetica;
+ text-align: right;
+ color: #808080;
+}
+
+.copyright:link {
+ text-decoration: underline;
+ color: #808080;
+}
+
+.copyright:visited {
+ text-decoration: underline;
+ color: #808080;
+}
+
+.copyright:hover {
+ text-decoration: underline;
+ color: #0000ff;
+
+}
+
+.subhead {
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 1.2em;
+ font-weight: bold;
+ /*margin: 0.5em 0% 0.5em 0%;*/
+}
+
+.content {
+ /*padding: 3em;*/
+ padding-top: 0em;
+ padding-left: 1.0em;
+ padding-right: 1.0em;
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 0.8em;
+}
+
+.ntable {
+ padding: 0em;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+.itable {
+ padding: 0em;
+ margin-top: 0.0em;
+ margin-bottom: 0.0em;
+}
+
+.ncontent {
+ /*content with no padding, for an ugly Netscape 4.7 compatibility hack*/
+ padding: 0em;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 0.8em;
+}
+
+PRE {
+ padding: 0.5em;
+ font-family: Lucida Console, Courier;
+ color: #000000;
+ font-size: 0.75em;
+}
+
+.input {
+ color: #0000ff;
+}
+
+.comment {
+ color: #ff0000;
+}
+
+.code {
+ font-family: Lucida Console, Courier;
+ color: #0000ff;
+ font-size: 0.9em;
+}
+
+.path {
+ font-family: Lucida Console, Courier;
+ /*color: #008060; */
+ font-size: 0.9em;
+ font-weight: bold;
+}
+
+.emphasis {
+ font-style: italic;
+}
+
+.brite {
+ color: #ff0000;
+}
+
+P.note {
+ padding: 0.5em;
+}
+
+P.impo {
+ padding: 0.5em;
+}
+
+P.warn {
+ padding: 0.5em;
+}
+
+.contentbox {
+ margin-left: 5%;
+ margin-right: 5%;
+ margin-top: 2%;
+ margin-bottom: 2%;
+ padding: 0.8em;
+}
+
+.logobg {
+ background: #45347b;
+}
+
+.top {
+ background: black;
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 0.8em;
+ color: #c0c0c0;
+ padding: 0em;
+ margin: 0em;
+}
+
+.topnews {
+ background: #5f4e4e;
+ color: white;
+}
+
+.tophead {
+ color: #a7f3fe;
+ font-weight: bold;
+ margin: 0em;
+}
+
+.tableinfo {
+ padding-left: 1.0em;
+ padding-right: 1.0em;
+ font-size: 0.7em;
+ background: #dddddd;
+ font-weight: bold;
+ font-family: Verdana, Arial, Helvetica;
+}
+
+.toptext {
+ color: #ffffff;
+ margin-bottom: 7px;
+}
+.toptext a:hover {
+ color: #00ff00;
+}
+
+.toptext a:link {
+ font-style: normal;
+ color: #00dd00;
+}
+
+.bartext {
+ color: #6c6cff;
+ font-family: Verdana, Arial, Helvetica;
+ font-size: 0.8em;
+ padding: 0em;
+}
+.docs-index {
+ margin: 0em;
+ margin-left: 20px;
+ font-family: Verdana, Arial, Helvetica;
+ line-height: 1.25em;
+ border: 3px white solid;
+}
+/*this works fine in IE, but not in any other browser!, yet it's perfectly valid */
+.docs-index .emphasis {
+ font-style: normal;
+ font-weight: bold;
+}
+
--- /dev/null
+while(<stdin>)
+{
+ if(/\[CALLPERL .*left\]/ ... /\[CALLPERL end\]/) {
+ $code .= $_ if(!/CALLPERL/);
+ $name = $1 if(/.swf.*name=([^&][^ ]*)/);
+ $name = $1 if(/.swf.*name="([^&]*)"/);
+ }
+ elsif(/\[CALLPERL .*right\]/ ... /\[CALLPERL end\]/) {
+ $highlight .= $_ if(!/CALLPERL/);
+ }
+ elsif ($code ne "") {
+ $code =~ s/"/"/g;
+ open(fi, ">tmp.sc");print fi $code;close(fi);
+ system("swfc tmp.sc");
+ ($embed = `swfdump -e $name`) =~ /WIDTH="([^"]*)"/;
+ $width = $1;
+ print "<td bgcolor=\"#ffffff\" width=\"$width\">";
+ print $embed;
+ print "</td>";
+ $code="";
+ print;
+ unlink "tmp.sc";
+ }
+ elsif ($highlight ne "") {
+ $highlight =~ s/^\n\s*//g;
+ $highlight =~ s/\s*\n$//g;
+ print "<pre>\n";
+ # todo: apply syntax highlighting.
+ print $highlight."\n";
+ print "</pre>\n";
+ $highlight="";
+ print;
+ }
+ else {
+ print;
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!--
+ SWFTools documentation stylesheet.
+
+ Major portions shamelessly stolen from the gentoo documentation project (www.gentoo.org).
+
+ This file is distributed under the GPL, see file COPYING for details.
+-->
+ <xsl:output encoding="iso-8859-15" method="html" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
+ <xsl:preserve-space elements="code"/>
+ <xsl:template match="img">
+ <img src="{@src}"/>
+ </xsl:template>
+
+ <xsl:template match="/guide">
+ <html>
+ <head>
+ <link title="new" rel="stylesheet" href="caiviar.css" type="text/css"/>
+ <link REL="shortcut icon" HREF="/favicon.ico" TYPE="image/x-icon"/>
+ <title>
+ <xsl:value-of select="title"/>
+ </title>
+ </head>
+ <body style="margin-left:0px;margin-top:0px;" bgcolor="#ffffff">
+ <table>
+ <tr>
+ <td>
+ <h1>
+ <b>
+ <font class="dochead">
+ <xsl:value-of select="title"/>
+ </font>
+ </b>
+ </h1>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <img src="line.gif" alt="line"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="alttext"><b>Summary:</b> <xsl:apply-templates select="abstract"/></td>
+ </tr>
+ <tr>
+ <td>
+ <img src="line.gif" alt="line"/>
+ </td>
+ </tr>
+ </table>
+
+ <xsl:apply-templates select="chapter"/>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="mail">
+ <a href="mailto:{@link}">
+ <xsl:value-of select="."/>
+ </a>
+ </xsl:template>
+
+ <xsl:template match="chapter">
+ <xsl:variable name="chid"><xsl:number/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="title">
+ <p class="chaphead">
+ <font class="chapnum">
+ <a name="doc_chap{$chid}"><xsl:number/>.</a>
+ </font>
+ <xsl:value-of select="title"/>
+ </p>
+ </xsl:when>
+ <xsl:otherwise>
+ <p class="chaphead">
+ <font class="chapnum">
+ <a name="doc_chap{$chid}"><xsl:number/>.</a>
+ </font>
+ </p>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates>
+ <xsl:with-param name="chid" select="$chid"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="section">
+ <xsl:param name="chid"/>
+ <xsl:variable name="sid"><xsl:number/></xsl:variable>
+ <xsl:if test="title">
+ <p class="secthead">
+ <xsl:value-of select="$chid"/>.<xsl:value-of select="$sid"/> 
+ <a name=""><xsl:value-of select="title"/> </a>
+ </p>
+ </xsl:if>
+ <xsl:apply-templates>
+ <xsl:with-param name="chid" select="$chid"/>
+ <xsl:with-param name="sid" select="$sid"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="subsection">
+ <xsl:param name="chid"/>
+ <xsl:param name="sid"/>
+ <xsl:variable name="ssid"><xsl:number/></xsl:variable>
+ <xsl:if test="title">
+ <p class="subsecthead">
+ <xsl:value-of select="$chid"/>.<xsl:value-of select="$sid"/>.<xsl:value-of select="$ssid"/> 
+ <a name=""><xsl:value-of select="title"/> </a>
+ </p>
+ </xsl:if>
+ <xsl:apply-templates>
+ <xsl:with-param name="chid" select="$chid"/>
+ <xsl:with-param name="sid" select="$sid"/>
+ <xsl:with-param name="ssid" select="$ssid"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="subsubsection">
+ <xsl:param name="chid"/>
+ <xsl:param name="sid"/>
+ <xsl:param name="ssid"/>
+ <xsl:variable name="sssid"><xsl:number/></xsl:variable>
+ <xsl:if test="title">
+ <p class="subsubsecthead">
+ <xsl:value-of select="$chid"/>.<xsl:value-of select="$sid"/>.<xsl:value-of select="$ssid"/>.<xsl:value-of select="$sssid"/> 
+ <a name=""><xsl:value-of select="title"/> </a>
+ </p>
+ </xsl:if>
+ <xsl:apply-templates>
+ <xsl:with-param name="chid" select="$chid"/>
+ <xsl:with-param name="sid" select="$sid"/>
+ <xsl:with-param name="ssid" select="$ssid"/>
+ <xsl:with-param name="sssid" select="$sssid"/>
+ </xsl:apply-templates>
+ </xsl:template>
+
+ <xsl:template match="figure">
+ <xsl:with-param name="chid"/>
+ <xsl:variable name="fignum">
+ <xsl:number level="any" from="chapter" count="figure"/>
+ </xsl:variable>
+ <xsl:variable name="figid">doc_chap<xsl:value-of select="$chid"/>_fig<xsl:value-of select="$fignum"/></xsl:variable>
+ <br/>
+ <a name="{$figid}"/>
+ <table cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td class="infohead" bgcolor="#7a5ada">
+ <p class="caption">
+ <xsl:choose>
+ <xsl:when test="@caption">
+ Figure <xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>: <xsl:value-of select="@caption"/>
+ </xsl:when>
+ <xsl:otherwise>
+ Figure <xsl:value-of select="$chid"/>.<xsl:value-of select="$fignum"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" bgcolor="#ddddff">
+ <xsl:choose>
+ <xsl:when test="@short">
+ <img src="{@link}" alt="Fig. {$fignum}: {@short}"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <img src="{@link}" alt="Fig. {$fignum}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ </table>
+ <br/>
+ </xsl:template>
+
+ <!--figure without a caption; just a graphical element-->
+ <xsl:template match="fig">
+ <center>
+ <xsl:choose>
+ <xsl:when test="@linkto">
+ <a href="{@linkto}">
+ <img src="{@link}" alt="{@short}"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <img src="{@link}" alt="{@short}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </center>
+ </xsl:template>
+
+ <xsl:template match="br">
+ <br/>
+ </xsl:template>
+
+ <xsl:template match="note">
+ <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td bgcolor="#bbffbb">
+ <p class="note">
+ <b>Note: </b>
+ <xsl:apply-templates/>
+ </p>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="impo">
+ <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td bgcolor="#ffffbb">
+ <p class="note">
+ <b>Important: </b>
+ <xsl:apply-templates/>
+ </p>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="warn">
+ <table class="ncontent" width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td bgcolor="#ffbbbb">
+ <p class="note">
+ <b>Warning: </b>
+ <xsl:apply-templates/>
+ </p>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="codenote">
+ <font class="comment">// <xsl:value-of select="."/></font>
+ </xsl:template>
+
+ <xsl:template match="comment">
+ <font class="comment">
+ <xsl:apply-templates/>
+ </font>
+ </xsl:template>
+
+ <xsl:template match="i">
+ <font class="input">
+ <xsl:apply-templates/>
+ </font>
+ </xsl:template>
+
+ <xsl:template match="b">
+ <b>
+ <xsl:apply-templates/>
+ </b>
+ </xsl:template>
+
+ <xsl:template match="brite">
+ <font class="brite">
+ <b>
+ <xsl:apply-templates/>
+ </b>
+ </font>
+ </xsl:template>
+
+ <xsl:template match="c">
+ <font class="code">
+ <xsl:apply-templates/>
+ </font>
+ </xsl:template>
+
+ <xsl:template match="box">
+ <p class="infotext">
+ <xsl:apply-templates/>
+ </p>
+ </xsl:template>
+
+ <xsl:template match="shell">
+ <table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td bgcolor="#f0f0f0">
+ <pre>
+ <font><xsl:apply-templates/></font>
+ </pre>
+ </td>
+ </tr>
+ </table>
+ <br/>
+ </xsl:template>
+
+ <xsl:template match="property">
+ <table class="itable" width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr><td width="2%"></td><td></td></tr> <!-- FIXME -->
+ <tr>
+ <td width="2%">
+ </td>
+ <td>
+ <font><b><xsl:apply-templates/></b></font>
+ </td>
+ </tr>
+ <tr></tr>
+ <tr><td width="2%"></td><td></td></tr> <!-- FIXME -->
+ </table>
+ </xsl:template>
+
+ <xsl:template match="code">
+ <xsl:param name="chid"/>
+ <xsl:variable name="prenum">
+ <xsl:number level="any" from="chapter" count="code"/>
+ </xsl:variable>
+ <xsl:variable name="preid">doc_chap<xsl:value-of select="$chid"/>_pre<xsl:value-of select="$prenum"/></xsl:variable>
+ <a name="{$preid}"/>
+ <table class="ntable" width="100%" cellspacing="0" cellpadding="0" border="0">
+ <tr>
+ <td></td><td width="32"></td>
+ <td class="infohead" bgcolor="#6c6cff">
+ <p class="caption">
+ <xsl:choose>
+ <xsl:when test="@caption">
+ Code listing <xsl:value-of select="$chid"/>.<xsl:value-of select="$prenum"/>: <xsl:value-of select="@caption"/>
+ </xsl:when>
+ <xsl:otherwise>
+ Code listing <xsl:value-of select="$chid"/>.<xsl:value-of select="$prenum"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <!-- <td> is inserted by perl -->
+[CALLPERL <xsl:value-of select="@lang"/> left]
+<xsl:apply-templates/>
+[CALLPERL end]
+ <!-- </td> is inserted by perl -->
+ <td width="32">
+ </td>
+ <td bgcolor="#e0ffff" valign="top">
+[CALLPERL <xsl:value-of select="@lang"/> right]
+<xsl:apply-templates/>
+[CALLPERL end]
+ </td>
+ </tr>
+ </table>
+ <br/>
+ </xsl:template>
+
+ <xsl:template match="f">
+ <font class="path">
+ <xsl:value-of select="."/>
+ </font>
+ </xsl:template>
+
+ <xsl:template match="uri">
+ <!-- expand templates to handle things like <uri link="http://bar"><c>foo</c></uri> -->
+ <xsl:choose>
+ <xsl:when test="@link">
+ <a href="{@link}">
+ <xsl:apply-templates/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="loc" select="."/>
+ <a href="{$loc}">
+ <xsl:apply-templates/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="p">
+ <xsl:param name="chid"/>
+ <xsl:choose>
+ <xsl:when test="@class">
+ <p class="{@class}">
+ <xsl:apply-templates>
+ <xsl:with-param name="chid" select="$chid"/>
+ </xsl:apply-templates>
+ </p>
+ </xsl:when>
+ <xsl:otherwise>
+ <p>
+ <xsl:apply-templates>
+ <xsl:with-param name="chid" select="$chid"/>
+ </xsl:apply-templates>
+ </p>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="title">
+ </xsl:template>
+
+ <xsl:template match="e">
+ <font class="emphasis">
+ <xsl:apply-templates/>
+ </font>
+ </xsl:template>
+
+ <xsl:template match="mail">
+ <a href="mailto:{@link}">
+ <xsl:value-of select="."/>
+ </a>
+ </xsl:template>
+
+ <xsl:template match="table">
+ <table class="ntable">
+ <xsl:apply-templates/>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="tr">
+ <tr>
+ <xsl:apply-templates/>
+ </tr>
+ </xsl:template>
+
+ <xsl:template match="ti">
+ <td bgcolor="#cccccc" class="tableinfo">
+ <xsl:apply-templates/>
+ </td>
+ </xsl:template>
+
+ <xsl:template match="th">
+ <td bgcolor="#6c6cff" class="infohead">
+ <b>
+ <xsl:apply-templates/>
+ </b>
+ </td>
+ </xsl:template>
+
+ <xsl:template match="ul">
+ <ul>
+ <xsl:apply-templates/>
+ </ul>
+ </xsl:template>
+
+ <xsl:template match="ol">
+ <ol>
+ <xsl:apply-templates/>
+ </ol>
+ </xsl:template>
+
+ <xsl:template match="li">
+ <li>
+ <xsl:apply-templates/>
+ </li>
+ </xsl:template>
+
+<!-- <xsl:template match="text()">
+ [
+ <xsl:value-of select="value()"/>
+ ]
+ </xsl:template>
+-->
+</xsl:stylesheet>
--- /dev/null
+<?xml version='1.0'?>
+<guide>
+
+<title>SWFC Manual</title>
+
+<abstract>
+swfc is a tool for generating flash files. You can write small simple scripts
+and then have them compiled to SWF Flash Animations.
+</abstract>
+
+
+<!--
+
+This comment aims to give a short overview over the tags defined in guide.xslt.
+Most are like html.
+
+Markups and Highlights:
+
+ <i>italic</i>
+ <b>bold</b>
+ <ul>Underline</ul>
+
+ <f>filename or pathname</f>
+ <c>variable name, command</c> ("c" stands for "code")
+
+Paragraphs:
+
+ <p>
+ Paragraph
+ </p>
+
+Line breaking:
+
+ <br/>
+
+Links:
+
+ <uri>http://www.quiss.org</uri> OR
+ <uri link=http://www.quiss.org>Quiss</uri>
+
+Shell scripts, commands to execute:
+
+ <shell>tail /var/log/messages</shell>
+
+Code:
+
+ <code lang="sc"> (The lang= is optional)
+ .swf
+ .box b1 100 100
+ .end
+ </code>
+
+Tables:
+
+ <table>
+ <tr><td>Apples</td><td>Pears</td></tr>
+ <tr><td>3</td><td>4</td></tr>
+ </table>
+
+Boxes:
+ <note>
+ Something interesting
+ </note>
+
+ <impo>
+ Something important
+ </impo>
+
+ <warn>
+ Something to be careful about
+ </warn>
+
+-->
+
+<chapter><title>swfc Basics</title>
+
+ <section><title>Calling swfc</title>
+
+ <p>
+
+ swfc is command line based. You call it via
+
+ <shell>$ swfc file.sc</shell>
+
+ The filename of what is generated depends on the filename of the script (<f>file.sc</f>),
+ the filename given inside the script, and the optional <c>-o</c> passed to swfc.
+
+ </p>
+
+ <note>
+ Though swfc is a command-line utility, there also exists a nice graphical
+ frontend for it, called <uri link="http://www.ucolick.de/~de/Snarf/quiss">Swifty</uri>.
+ </note>
+
+ </section>
+
+ <section><title>A simple swfc example</title>
+
+ <p>
+ 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.
+ </p>
+
+ <code lang="swfc">
+.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
+ </code>
+
+ The <c>.box</c> command creates the box. Every object that is created must also be explicitly
+ put into the scene using <c>.put</c> to become visible.
+
+ </section>
+
+ <section><title>Text generation</title>
+
+ <code lang="swfc">
+.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
+ </code>
+
+ <code lang="swfc">
+.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
+ </code>
+
+ </section>
+
+ <section><title>Color transforms</title>
+
+ <code lang="swfc">
+.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
+ </code>
+
+ </section>
+
+
+</chapter>
+</guide>