After extensive research into an Open Source alternative to the Flash development platform, I've realised it's possible.. but not easy. First of all, there's not one program that can do the entire song and dance, but there are a few programs that, when used together, can come close. If you don't mind using Actionscript to do all of your animations, and you're somewhat technologicaly enabled (or just able to follow simple instructions) then a free option to flash is viable for you.
The set of software I use is
Inkscape, a neat and powerfull vector graphics program;
SWFTools, a set of simple swf conversion and utility tools; and
FlashDevelop, an awesome ActionScript editor, asset manager and Flash generation software.
Inkscape is used for creating the graphics that will be used in your flash movie. It's unfortunate that Inkscape can't export directly to swf format, but after exporting your graphic to pdf, you can convert the pdf to an swf using SWFTools. Then using FlashDevelop, write the actionscript to tie all the movie clips together and export it as an swf. Sounds pretty simple right?
Inkscape
Inkscape is quite robust with many options that may not be obvious at first glance. I suggest reading a few of the tutorials under help, especially the Basics and Shapes tutorial that covers keyboard functions.
Note: our conversion tool does not support gradients, or transparency. The lack of gradient support is unfortunate, but the Transparency can be handled through Actionscript
Keep each movie clip in it's own file, otherwise there will be hell to pay when you want to seperate them later at the conversion stage.
Once you're finished drawing, save it using "
Save As..." and select the file type "
PDF with Transparency (*.pdf)" for this tutorial we'll be using the file
c:\example.pdf
SWFTools
This set of tools is dos based, so we'll have to use the command console to use them. Under "
Start" click "
Run..." and run the command "
cmd" (without the quotation marks). Navigate to the folder where you installed SWFTools (default is c:\swftools), from here there are many tools available to us, but we'll be concentrating on
pdf2swf.exe and
swfextract.exe
pdf2swf.exe will do basically what you expect it to do, take a pdf file and convert it to swf. This unfortunately creates a white page behind your drawing, destroys all gradients and screws up transparencies. the command for this operation is:
Code:
pdf2swf.exe c:\example.pdf -o example.swf
the
-o example.swf is used to specify what you want to call your converted swf file.
Now that we have our converted swf file, we want to get rid of the white page that is behind our graphic. There's actually two layers we want to get rid of, one is black and on the lowest layer, and the white one that is just above the black one. This will leave us with only the graphic with no background. To do this we need to extract all the object from the swf, except for the first two. First we need to find out how many objects are in our swf by using the command
Code:
swfextract.exe example.swf
this will give us some information about our swf clip. We want to take all the shapes from the swf except for shape 1 and 2 (which ate the white and black pages of the background) so we will use the command
Code:
swfextract.exe -P -i 3-24 -o example-results.swf example.swf
the
-P (capital P, lower case p is used for extracting jpgs) is required whenever extracting multiple shapes, and the
-i 3-(insert highest number shape here) is used for selecting the shapes you want extracted from the swf.
FlashDevelop
FlashDevelop is primarily an ActionScript editor with the ability to manage assets for the Actionscript to interact with. Now that we have some swf movies to play with, we can add them to our project library in FlashDevelop.
To add an swf movie to the library, simply right click on the library folder, go to
Add -> Existing File.. then navigate to your swf file. FlashDevelop keeps a copy of the file in your project directory for safe keeping. Now that the swf file is listed, right click on it and choose
Add to Library, your swf file is now available for use.
The major draw backs to using this method over Flash, is the lack of time lines and animated drawings. This can be overcome using an ActionScript based animation package like
Fuse or writing your own animation script, though it is a bit more cumbersome. There's also the matter of gradients and transpacency, though as these Open Source projects develop further these issues will most likely be resolved. Despite the drawbacks and the complicated process, it saves a few hundred dollars.. which in my opinion, more than makes up for it.
As these tools continue to evolve and mature, I'll update this tutorial to ensure that the easiest and best methods for developing Flash projects with Open Source software are documented.