Copy link to clipboard
Copied
Hi,
In my project, I have multiple fla files and want to export all my files to mp4 automatically. Is there any way to export files automatically.
Hi.
This is script should be able to open up all FLAs within a folder, export all main timeline frames as a uncompressed .mov and then open up Adobe Media Encoder so you can convert the generated video files to .mp4.
JSFL:
function main()
{
var uri = fl.browseForFolderURL("select", "Select the folder containing the FLAs.");
var files = FLfile.listFolder(uri + "/*.fla", "Files.");
var total = files.length;
var dom, i, source;
try
{
for (i = 0; i < total; i++)
...
Copy link to clipboard
Copied
Animate doesn't have a native script that allows auto-export. There may be a way to write a script on the OS side to open and export FLA files in a folder perhaps. How many FLA files do you have?
Copy link to clipboard
Copied
Also - check this:
https://community.adobe.com/t5/animate/export-png-sequences-from-multiple-files-at-once/td-p/1008608...
Copy link to clipboard
Copied
Hi.
This is script should be able to open up all FLAs within a folder, export all main timeline frames as a uncompressed .mov and then open up Adobe Media Encoder so you can convert the generated video files to .mp4.
JSFL:
function main()
{
var uri = fl.browseForFolderURL("select", "Select the folder containing the FLAs.");
var files = FLfile.listFolder(uri + "/*.fla", "Files.");
var total = files.length;
var dom, i, source;
try
{
for (i = 0; i < total; i++)
{
source = uri + "/" + files[i];
fl.openDocument(source);
dom = fl.getDocumentDOM();
dom.exportVideo(source.slice(0, -4) + ".mov", true, false, true, dom.timelines[0].frameCount);
dom.close(false);
}
}
catch(error)
{
fl.trace(files);
fl.trace(error);
fl.trace("___________");
}
}
main();
Please visit this link for more info about the exportVideo method so you can customize it according to your needs.
I hope this helps.
Regards,
JC
Copy link to clipboard
Copied
So cool JC!
Copy link to clipboard
Copied
Thanks a lot, Chris!
Copy link to clipboard
Copied
Thanks,
But I have a new problem, the encoder does not start automaticlly.
Copy link to clipboard
Copied
Hi.
It may take some time for it to open and to load the videos indeed.
It's best to let it open before running the script.
Copy link to clipboard
Copied
You can also set the second paramater of the exportVideo method to false, like this:
dom.exportVideo(source.slice(0, -4) + ".mov", false, false, true, dom.timelines[0].frameCount);
Then when all the videos .mov files are created and can you send them all at once to Adobe Media Encoder.
Copy link to clipboard
Copied
Very useful, thank you very much.
One question, what if I wanted the export to be TIFF sequence?