1
$Header: /home/dan/cvs/swfmill/README,v 1.12 2005/05/29 19:32:15 dan Exp $
6
swfmill is a tool to process Shockwave Flash(TM) (SWF) files.
7
It can convert SWF from and to an XML-dialect called "swfml",
8
which is closely modeled after the SWF file format.
10
It also provides a libxslt-based XSL transformator that
11
supports an extension ("swft") which helps with generating
12
IDs for SWF objects and can import an SWF as XML using an
13
XPath command (swft:document()).
15
As a simple application of such functionality, swfmill can
16
pack together a bunch of media files (jpeg and png images,
17
other SWF movies, TrueType fonts) into an SWF as "library
18
objects" for your attachMovie() pleasure.
4
swfmill is a tool to process Shockwave Flash(TM) (SWF) files. It can convert
5
SWF from and to an XML-dialect called "swfml", which is closely modeled after
8
It also provides a libxslt-based XSL transformator that supports an extension
9
("swft") which helps with generating IDs for SWF objects and can import an SWF
10
as XML using an XPath command (swft:document()).
12
As a simple application of such functionality, swfmill can pack together a
13
bunch of media files (jpeg and png images, other SWF movies, TrueType fonts)
14
into an SWF as "library objects" for your attachMovie() pleasure.
23
swfmill is alpha-quality software. It might well not work
24
as it should. Please report your experiences if that seems
25
to be the case, send in (if possible small) SWFs or patches.
19
swfmill is alpha-quality software. It might well not work as it should.
20
Please report your experiences if that seems to be the case, send in (if
21
possible small) SWFs or patches.
23
You can report bugs or contribute patches via Launchpad at
24
http://bugs.launchpad.net/swfmill/+filebug
30
29
swfmill requires, and the windows binary release contains
32
libxml2 - (C) 1998-2003 Daniel Veillard.
34
- (C) 2001-2002 Daniel Veillard.
35
zlib - (C) 1995-2004 Jean-loup Gailly and Mark Adler.
36
freetype - (C) 1996-2000, 2002, 2004 David Turner,
37
Robert Wilhelm, and Werner Lemberg.
38
libpng - (C) 2004 Glenn Randers-Pehrson.
40
my references to the SWF format were:
42
http://sswf.sourceforge.net/SWFalexref.html
44
http://sswf.sourceforge.net/
32
libxml2 — © 1998–2003 Daniel Veillard.
33
libxslt/exslt — © 1998-2003 Daniel Veillard.
34
zlib — © 1995-2004 Jean-loup Gailly and Mark Adler.
35
freetype — © 1996-2000, 2002, 2004 David Turner,
36
Robert Wilhelm, and Werner Lemberg.
37
libpng — © 2004 Glenn Randers-Pehrson.
39
My references to the SWF format were:
42
http://sswf.sourceforge.net/SWFalexref.html
45
http://sswf.sourceforge.net/
50
SWF File Format Specification
51
http://www.adobe.com/devnet/swf/
49
54
COMPILING AND INSTALLING
51
on linux, use the "GNU-standard"
52
./configure && make && make install
54
on windoze, if you have use for a tool like this,
55
you know better than me where to put swfmill.exe.
56
On Linux, use the "GNU-standard"
58
./configure && make && make install
60
On Windows, if you have use for a tool like this, you know better than me
61
where to put swfmill.exe.
60
66
see swfmill -h for general usage options.
62
68
convert an SWF (foo.swf) to XML:
63
swfmill swf2xml foo.swf bar.xml
70
swfmill swf2xml foo.swf bar.xml
65
72
convert such XML to SWF:
66
swfmill xml2swf bar.xml meep.swf
74
swfmill xml2swf bar.xml meep.swf
69
78
SIMPLE SWFML DIALECT
71
for library generation, and probably other fun swf
72
construction, swfmill supports a simplified XML
73
dialect. to create a library swf that includes some
74
assets, construct an XML file that looks like this:
76
<?xml version="1.0" encoding="iso-8859-1"?>
77
<movie width="320" height="240" framerate="12">
78
<background color="#ffffff"/>
82
<clip id="jpg" import="library/testjpg.jpg"/>
83
<clip id="png" import="library/testpng.png"/>
84
<clip id="swf" import="library/shape.swf"/>
87
<font id="vera" import="library/vera.ttf"
88
glyphs="abcdefghijklmnopqrstuvwxyz"/>
80
For library generation, and probably other fun SWF construction, swfmill
81
supports a simplified XML dialect. to create a library swf that includes
82
some assets, construct an XML file that looks like this:
84
<?xml version="1.0" encoding="iso-8859-1"?>
85
<movie width="320" height="240" framerate="12">
86
<background color="#ffffff"/>
90
<clip id="jpg" import="library/testjpg.jpg"/>
91
<clip id="png" import="library/testpng.png"/>
92
<clip id="swf" import="library/shape.swf"/>
95
<font id="vera" import="library/vera.ttf"
96
glyphs="abcdefghijklmnopqrstuvwxyz"/>
93
swfmill simple <the-xml-above.xml> output.swf
95
output.swf should now contain the specified assets (the jpg,
96
pngs, other swf and font) specified.
102
swfmill simple <the-xml-above.xml> output.swf
104
output.swf should now contain the specified assets (the JPG, PNGs, other
105
SWF and font) specified.
99
* the file paths in the simple xml are relative to
100
where you start swfmill.
101
* any <clip import=".."/> that is placed within a
102
<library/> tag will be exported for attachMovie
103
with linkage id == their id attribute. for the above
104
example, you can attach library/testjpg.jpg with:
105
_root.attachMovie("jpg","foo",1);
106
* the font is available by its id also, and will contain
107
only the characters specified in its glyph attribute.
108
make sure you specify the correct encoding in the
109
<?xml?> processing instruction for special characters.
109
* The file paths in the simple XML are relative to where you start swfmill.
111
* Any <clip import=".."/> that is placed within a <library/> tag will be
112
exported for attachMovie with the ID attribute as the linkage ID. For the
113
above example, you can attach library/testjpg.jpg with
115
_root.attachMovie("jpg", "foo", 1);
117
* The font is also available by its ID, and will contain only the characters
118
specified in its glyph attribute. Make sure you specify the correct
119
encoding in the XML declaration for characters outside the ASCII range.
114
swfmill supports both generation and use of shared libaries.
115
To generate a shared libary, simply put your assets in a
116
<library/> tag just as for attachMovie (see above).
124
swfmill supports both generation and use of shared libaries. To generate a
125
shared libary, simply put your assets in a <library/> tag just as for
126
attachMovie (see above).
118
To use a shared library, the library swf has to be available
119
both locally and under its "public" URL. Assuming you have
120
put your library on http://foo.com/library.swf, and the swf
121
is also in the library/ subdirectory of where you run
122
swfmill, put this in your definition XML:
123
<import file="library/library.swf"
124
url="http://foo.com/library.swf"/>
125
That should import all symbols that are exported in
126
library.swf, so they should be available under their name
127
with attachMovie(). Note: this only works with proper
128
assets, not with fonts. If you know how to use a font
128
To use a shared library, the library swf has to be available both locally
129
and under its "public" URL. Assuming you have put your library on
130
http://foo.com/library.swf, and the SWF is also in the library/ subdirectory
131
of where you run swfmill, put this in your definition XML:
133
<import file="library/library.swf"
134
url="http://foo.com/library.swf"/>
136
That should import all symbols that are exported in library.swf, so they
137
should be available under their name with attachMovie(). Note: this only
138
works with proper assets, not with fonts. If you know how to use a font
129
139
from a shared library, please tell me.
133
swfmill is (C) 2005, daniel fischer.
134
swfmill is licensed to you under the GPL.
135
see COPYING for details.
140
updates and stuff will be available at:
141
http://iterative.org/swfmill/
143
to praise or complain, send mail to:
146
there is a mailing list for swfmill on osflash.org:
147
http://osflash.org/mailman/listinfo/swfmill_osflash.org
144
Copyright © 2005–2007 Daniel Turing.
145
Copyright © 2005–2009 swfmill contributors (see AUTHORS).
147
swfmill is free software; you can redistribute it and/or modify it under the
148
terms of the GNU General Public License version 2, as published by the Free
149
Software Foundation. See COPYING for details.
154
Updates and stuff will be available at the swfmill homepage:
156
http://www.swfmill.org/
158
There is a mailing list for swfmill hosted by osflash.org:
160
http://osflash.org/mailman/listinfo/swfmill_osflash.org
162
The latest development source code can be retrieved via Launchpad and the
163
Bazaar version control system:
165
bzr branch lp:swfmill
167
Report bugs or submit patches via Launchpad:
169
http://bugs.launchpad.net/swfmill/+filebug