Exporting sounds from a .FLA

Here’s a script to export all the sounds from your library.
It should save them in the same directory as the FLA file.

var out=fl.outputPanel;
var doc=fl.getDocumentDOM();
var lib=doc.library;

var saveDir=doc.pathURI.substring(0, doc.pathURI.lastIndexOf("/")+1);

var itemCount=lib.items.length;
for(a=0; a<itemCount; a++){
    var item=lib.items[a];
    item.exportToFile(saveDir+( item.name.substring(0, item.name.lastIndexOf(".")) )+".wav");

Save the code to a file called “Export Sounds.jsfl” in
C:\Documents and Settings\username\Local Settings\Application Data\Adobe\Flash CS4\en\Configuration\Commands

This is something a put together in 5 minutes using the flash documentation.
I have absolutely no experience with the flash javascript API so I cannot guarantee anything.
It might work in previous versions of flash but I can’t really say for sure.