There are two methods. The first is File Juicer, a brilliant little program that extracts files data that's embedded in other files for example, a JPEG image that's in a Microsoft Word file, or more importantly, an mp3 embedded in an swf. It won't work on all swfs, though, because not all of them store their audio in that way.
If File Juicer doesn't work, you can use Audio Hijack (or its big brother, Audio Hijack Pro) to record the audio stream from Safari (or whatever program you use) as you play the swf. You can have Audio Hijack save it as an AIFF, mp3, or AAC, and of course once it does you can convert it to whatever format you want using iTunes or whatever.