• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Extract audio files from .fla file

Community Beginner ,
May 04, 2018 May 04, 2018

Copy link to clipboard

Copied

Hi everyone !

I have a .fla file that contains a lot of sound files in the library, and I would like to export them and use them in after effect.

I can't export them one by one because there are over 500+ sounds (the file is over 550 mb).

I tried to change the extension of the file to .rar and extract it with winrar, but I get an empty folder called "LIBRARY" (with only the sub-folders and nothing else).

Is there a way to get those sounds ? Thank you.

[Message from moderator: Do not add URLs/websites to your signature or your account will be banned]

Views

6.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 04, 2018 May 04, 2018

If MP3 was acceptable the fastest solution would be to convert the FLA to HTML5 Canvas, and do a publish. You would get all of the sounds that were either used in the timeline somewhere, or had a linkage set in the library.

For extracting perfect quality WAV, I'm not sure if renaming the DAT files will do it. You could export to video, and end up with a long recording of all the sounds used in the timeline. But that would be tedious.

Votes

Translate

Translate
Community Expert ,
May 04, 2018 May 04, 2018

Copy link to clipboard

Copied

Hi.

Save your file as a .XFL, go to the generated folder > LIBRARY and get your sound files there.

I hope it helps.

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 04, 2018 May 04, 2018

Copy link to clipboard

Copied

Didn't work, I got an empty folder just like with the Winrar technique.

sound.png

[Message from moderator: Do not add URLs/websites to your signature or your account will be banned]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 04, 2018 May 04, 2018

Copy link to clipboard

Copied

That's odd. I've tested with AS3 and HTML5 (Canvas) documents and the sounds were in that folder.

Can you share your file with just one or two sounds so we can investigate?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 04, 2018 May 04, 2018

Copy link to clipboard

Copied

I left two sound files : File sharing and storage made simple

You may need to lower down the volume a bit.

[Message from moderator: Do not add URLs/websites to your signature or your account will be banned]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 04, 2018 May 04, 2018

Copy link to clipboard

Copied

Thank you!

I think it has something to do with having the sounds stored in the root or subfolders of the Library panel.

I tested with a sound stored in the root level of the Library panel and when I save the FLA as XFL the sound is exported to the LIBRARY folder as expected.

But when I store the song in a subfolder inside of the Library panel (e.g. 'sounds'), and save the FLA to XFL, the song is not exported to the LIBRARY folder.

Other interesting thing: if you go to the bin folder and change the DAT files to a valid audio extension (like MP3), they work... In my tests. But not with your files...

Maannn...

I'll see if there's a way to automate this using JSFL.

In the meantime, I hope someone else can give us an explanation.

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 04, 2018 May 04, 2018

Copy link to clipboard

Copied

If MP3 was acceptable the fastest solution would be to convert the FLA to HTML5 Canvas, and do a publish. You would get all of the sounds that were either used in the timeline somewhere, or had a linkage set in the library.

For extracting perfect quality WAV, I'm not sure if renaming the DAT files will do it. You could export to video, and end up with a long recording of all the sounds used in the timeline. But that would be tedious.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 04, 2018 May 04, 2018

Copy link to clipboard

Copied

Nice one, Colin!

 

The user would still have to do some manual work, but it would do the job.

 

Alternatively, here is a script that will export selected Library sounds to files.

https://github.com/joao-cesar/adobe/tree/master/animate%20cc/jsfl/export_library_sounds

 

As usual, I invite anyone to fix it or improve it in any way needed.

 

Code for reference only:

function exportLibrarySoundsToFiles()
{
    var doc = fl.getDocumentDOM();
    var selectedItems;
    var folder;
    
    if (!doc)
    {
        alert("Open up a FLA first");
        return;
    }        
    
    selectedItems = doc.library.getSelectedItems();
    
    if (!selectedItems || selectedItems.length === 0)
    {
        alert("Please select at least one Library sound.");
        return;
    }
    
    folder = fl.browseForFolderURL("Choose an output directory.");
    
    if (!folder)
    {
        alert("Invalid path.");
        return;
    }        
    
    for (var i = 0total = selectedItems.lengthi < totali++)
    {
        var selectedItem = selectedItems[i];
        
        if (selectedItem.itemType === "sound")
        {           
            var destination;
            var extensions = [".aif"".aiff"".aifc"".wav"".mp3"".asnd"".au"".snd"".sd2"".ogg"".oga"".flac"];
            var extension = selectedItem.name.substr(-4);
            
            if (extensions.indexOf(extension> -1)
                destination = folder + "/" + selectedItem.name;
            else
                destination = folder + "/" + selectedItem.name.split("/").pop() + ".wav";
            
            selectedItem.exportToFile(destination);         
        }
        else
            fl.trace(selectedItem + " is not a sound.");
    }
}

exportLibrarySoundsToFiles();

 

Usage:

1 - Save the script in a file with a .jsfl extension;

2 - Open up your FLA;

3 - Select the library sounds you want to export;

4 - To run the script, do one of the following:

- Double-click it (the .jsfl file);

- Drag and drop the .jsfl file over the Animate IDE

- Go to Commands > Run Command....

 

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

How do I use this script in combination with a .fla file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

Hi.

 

1 - Download the .jsfl file from the link or just save the script in a file with a .jsfl extension;

2 - Open up your FLA;

3 - Select the library sounds you want to export;

4 - To run the script, do one of the following:

- Double-click it (the .jsfl file);

- Drag and drop the .jsfl file over the Animate IDE

- Go to Commands > Run Command....

 

I hope this helps.

 

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

Thanks for the quick response!  🙂

I've tried this, but either only a couple of sounds export, or no sounds export at all.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

Wow! There were some huge silly mistakes on that script. It's been a while since I wrote that. As no one never mentioned, it remained wrong all this time.

 

Basically I was referencing the array of selected items as if it were the array items themselves! Shame on me.

 

I fixed it along with some minor improvements.

 

I hope now it helps!

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

Okey-dokey, cheers for looking into this!  😄

Could you provide a download for the new script file please?  🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2023 Mar 01, 2023

Copy link to clipboard

Copied

It worked for me! Saved my day. 🙂

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 01, 2023 Mar 01, 2023

Copy link to clipboard

Copied

LATEST

Awesome!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

Sure. I've just updated my comment above with the link.

 

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

How do I download it from GitHub? I don't see a download link anywhere...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

You're gonna have to download the whole repository (https://github.com/joao-cesar/adobe) or just copy and place the script in a text file and save/rename with the .jsfl extension.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 15, 2019 Oct 15, 2019

Copy link to clipboard

Copied

Thanks! I'll give that a try, and see if your new file works.  🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

Unfortunately, it still seems to not work. I've tried both double-clicking the file and drag-dropping it onto Adobe Animate, and no luck. After selecting a destination, nothing appears to happen.

I thought "Maybe my desired location is situated with a location path too long/in too many sub-folders deep for the script to handle", so I tried a different location in a test folder in my Music library, but that also didn't work. I'm using Windows 7 64-bit.

 

Any ideas?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines