As far as I'm aware, for obvious security reasons there is no way to directly write any kind of file directly from flash, however it is possible to use fscommand (in AS2) or the ExternalInterface class (in AS3) to send data to an external server-side script, which in turn can process the data and save files on the server. Upon successful creation of a file, external scripts will usually pass a hyperlink back into the .swf which will enable the user to download a copy of the file they created.
I've seen some online flash apps which allow you to create images or text files which use this method, but I've not really seen any of the back-end code.
I've certainly never seen it used to export mp3's! However, that said I couldn't entirely rule it out, it may be possible! If it's possible send bitmap data from a swf and then convert/save it via an external script, then it's reasonable to assume that you could probably do the same with an mp3!
I used fscommand in AS2 several years ago to get some flash based e-learning content to communicate with a content management system (passing user data and scores in and out), but I've never tried doing it with anything like images or sounds, so I wouldn't know where to start there.
It's not going to instantly solve your problem, but it should at least serve as a starting point!