I'm trying to modify publish settings via XML edits (jsfl), but I'm having some issues with Output (filename) settings resetting to the FLA filename when I re-import the XML.
If I have a Test.fla :
var dom = fl.getDocumentDOM();
var profileXML = dom.exportPublishProfileString('SVG');
var outName = "Test_001.svg";
// replace all "filename" properties
profileXML = profileXML.replace(/<Property name="filename">.+?<\/Property>/g, '<Property name="filename">'+outName+'</Property>');
profileXML traces correctly, with instances of: <Property name="filename">Test_001.svg</Property>
However, the Output name in Publish Settings has reverted to the Test (the name of the FLA file), and fl.Publish() outputs as Test.svg
You'll note I'm exporting as SVG, and SVG Image is already set up in the settings. The only thing I need to alter on Publish() is the output name.
Is there any simple (or better) way around this?
Animate CC 18.0.2 Build 126
Message was edited by: adamlt, subject title clarity
Retrieving data ...