So here we go!
Just run the 'fla_to_svg.jsfl' script by going to 'Commands > Run Command...' or just dragging over to the Animate IDE.
Then the script will prompt you to choose the folder where the FLAs are located.
Now you just have to wait. Just pay attention that if some document asks you for missing fonts, you are going to have to dismiss the popup manually - you can check "Don't show again.".
Optionally, there is another script called 'export_publish_profile.jsfl' that you can use to change the SVG publish settings if you wish.
All you have to do is to open any FLA, go to File > Publish Settings..., configure the way you want things and then run the script to get the current settings and export to the 'fla_to_svg.xml'. Notice that in this way you can use the script to export the FLA to anything, not just SVG.
Scripts download: fla_to_svg.jslf.
'fla_to_svg.jsfl' code:
fl.outputPanel.clear();
function exportToSVG()
{
var uri = fl.browseForFolderURL("select", "Select the folder containing the FLAs.");
var files = FLfile.listFolder(uri + "/*.fla", "Files.");
var total = files.length;
try
{
for (var i = 0;i < total; i++)
{
var profileIndex;
fl.openDocument(uri + "/" + files);
profileIndex = fl.getDocumentDOM().importPublishProfile(fl.scriptURI.replace(".jsfl", ".xml"));
fl.getDocumentDOM().currentPublishProfile = fl.getDocumentDOM().publishProfiles[profileIndex];
fl.getDocumentDOM().publish();
fl.getDocumentDOM().deletePublishProfile();
fl.getDocumentDOM().close(false);
}
}
catch(error)
{
fl.trace(files);
fl.trace(error);
fl.trace("___________");
}
}
exportToSVG();
'export_publish_profile.jsfl' code:
fl.outputPanel.clear();
function exportPublishProfile()
{
fl.getDocumentDOM().exportPublishProfile(fl.scriptURI.replace("export_publish_profile.jsfl", "fla_to_svg.xml"));
}
exportPublishProfile();
I hope it helps and don't hesitate to ask if you have any further question.
Regards,
JC