Mobile app version of vmapp.org
Login or Join
Heady304

: ExportSVG in jsfl run as a command in adobe animate doesn't work In Adobe Animate and with a .fla file (after importing a swf file, import to stage), I run this script var exportFileName =

@Heady304

Posted in: #AdobeAnimate #Javascript

In Adobe Animate and with a .fla file (after importing a swf file, import to stage), I run this script

var exportFileName = 'file:///C|/temp/files/a.svg';
fl.getDocumentDOM().exportSVG(exportFileName, true, true);


it doesn't seem to do anything at all...no svg file is created at all. If I change exportSVG to exportPNG with the same parameters it does seem to work. I have found a couple of examples online using this exportSVG function but I can't find any official documentation (no documentation for exportPNG either).

Does anyone know how to make this work, know if it should work or at least might be able to point me to some documenation?

As additional info, if I add trace statements that the content of the output panel is wiped clean as soon as the exportSVG line gets hit. I've also played around with the parameters of exportSVG and nothing seems to work. If I use the file menu 'export (legacy)' and choose svg, I am able to export it manually

Using Adobe Animate CC v18.0 Build 107

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady304

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jessie844

All it needs is to set the svg properties in the publish settings dialog.

Make sure you check the 'SVG Image' option in the publish settings dialog and save the .fla file (this can all be done via script but I had a default .fla file that I then imported into, delete layers, save, then export svg)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme