Making Flash demos using Open Source Software

by Justin Clarke

I recently had the need to generate some flash demos to demonstrate the Oedipus Web Scanner in action. Since I don't happen to have one of the commercial Flash demo generators handy at home (I use Viewlet Builder for Linux at work) I decided to see what I could get done with an all Open Source solution.

I quickly found vnc2swf, for recording a VNC session as a Flash movie. There are two versions of vnc2swf, one in C and one in Python - I ended up using both in my case. A cool feature both version have is they generate an HTML file that you can use to display the Flash file you just created. The Python version, which is the one under active development, generates a nice Javascript progress bar and pause button in this page, which I ended up using verbatim for my demo pages.

Since I was recording on Linux I installed TightVNC as my VNC server (you can use any VNC server, such as RealVNC or UltraVNC, or the original VNC if you still use it).

Running vncserver on Linux starts a separate X Windows session that can have it's own programs running. This was perfect for my needs, however if you need access to your entire desktop for some reason you could use x11vnc for this. For the purposes of what I needed, I configured my VNC session to run gnome terminal and metacity so I could get a Gnome-style capture. You do this by configuring your $HOME/.vnc/xstartup file on the server I was using. This is what mine looks like:

xrdb $HOME/.Xresources
xsetroot -solid grey
gnome-terminal &
metacity &

After this is all setup, we point vnc2swf at the vncserver. In my case, the options I used (using the C version of vnc2swf) were similar to this:

vnc2swf -startrecording -geometry 800x600 -depth 16 -framerate 5 \

~/moviename.swf hostname:1.0

After recording a satisfactory demo, I recorded an audio commentary as a 44kbps WAV file, compressed this to a 24kbps MP3 file using LAME, and added this to the original Flash file (and did some compression as well) using from the Python version of vnc2swf as follows: -a audio.mp3 -c -o output.swf original.swf

And we're done! I should note that one of my audio files was a few seconds too long. I used Audacity to "speed up" the file so that it fit the length of the flash movie.

For reference, the demos I recorded are here and here to see what kind of quality I ended up with.

Final Note: A colleague pointed me to Wink after I had completed this. I will be trying this next time I need to do a software demo.