Here's how you extract a thumbnail from an video stored in an swf file. I'll leave the apt-get install dependencies as an exercise to the reader.
#!/bin/bash
SWF="$1"
AVI="${SWF/swf/avi}"
JPG="${SWF/.swf/%d.jpg}"
flasm -x "${SWF}"
mencoder -endpos 5 "${SWF}" -o /dev/null -nosound -ovc xvid -xvidencopts pass=1:turbo
mencoder -endpos 5 "${SWF}" -o "${AVI}" -nosound -ovc xvid -xvidencopts pass=2:bitrate=1600
ffmpeg -i "${AVI}" -an -ss 00:00:03 -t 00:00:01 -r 1 -y -s 120x90 "${JPG}"
BTW, this also converts the SWF to an AVI along the way, so if that's useful to you, great. (Modify the endpos and get rid of -nosound if you really wanted the AVI.)