svg2swf

This is a command-line Python script that will convert a (rudimentary) SVG file into a Macromedia Flash (swf) file, using SAX to do the parsing, and the ming library to write the .swf file.

News/History

July 29, 2001

Release of v0.1.3. - I've taken off the warning about this being a developer only release, because I think it's starting to get generally useful. It's still very rough around the edges, though, so use at your own risk. New features:

July 23, 2001

Release of v0.0.2. This release is the first one to render tiger.svg properly. Complete handling of the path element.

July 11, 2001

Release of v0.0.1. First release, limited handling of path element, along with rect and a couple of others I forget.

Download

Requirements


Examples

The most impressive image I've tested this with is the tiger image off of the Gill page. Here's the resulting output (with a one-line cheat to center the image):

The tiger is acutally comprised of very few SVG primatives, so it's not that impressive to have an SVG renderer handle it. Still, it looks pretty.

The way I've been developing this has been by tackling testcases from the W3C's SVG Conformance Test Suite. Here's a list of the tests that (I think) this passes (with caveats):

Caveats: Flash doesn't allow for setting the linecap, which defaults to "round cap" in Flash. Since SVG defaults to "butt cap", and since I can't change to that value, that's a problem. Also, the hyperlink text area is a bit out of control. If it passes any others, it'd be out of luck, becuase generally speaking, if I haven't looked at it, it doesn't work.
Copyright 2001 Rob Lanphier

Rob's Homepage