JSFL - Resize a document, or export to larger PNG?
I've come to notice how limited the JavaScript API is for Animate compared to the features that are accessible through GUI elements like panes and menus. One such issue I'm facing has to do with exporting images - we're revisiting some old content to bring it forward from Flash to HTML 5 Canvas. I've written a set of JSFL scripts that have done things like detect whether a document's output is best suited as a static image or a movie, export it as such, and to do these tasks on batches of files to cut down on time spent and the tedium threshold - we're talking hundreds of files at a time. Because Flash's SVG exports don't seem to properly handle some text formatting correctly, I've opted to instead export "static" FLAs as PNG files just to get something out the door.
The problem here is that we're exporting for screens around 720p in size, and our average stage size across all files seems to be about 480p or lower. The JavaScript API documentation available from the Adobe I/O page for Animate indicates that document.exportPNG() should present an options dialog when I pass false as the second argument, whereas true would apparently use the settings entered last. This does not happen and exportPNG() just outputs a PNG file with the same dimensions as the stage.
I then thought, okay, I'll just have my scripts scale the stage up to a maximum horizontal or vertical resolution. Well, while there's a checkbox on the stage properties panel I can select to have Animate automatically scale my content with stage size changes, there's no apparent way to access this feature via the JS API, and trying to do it manually by iterating over every single element in every keyframe in every layer has shown erratic results, especially with text which at best becomes misaligned with other elements on the stage and leaves manual work still needing to be done, which is what we're trying to avoid.
Anyone got any insight into how to accomplish either task, barring diving deeper into Animate's inner workings and writing my own DLL extensions?
