I'm trying to export multiresolution spritesheets from a movieclip or a library item in a FLA file via JSFL. What I want to achieve is the correct automated exporting of 1x, 2x, 4x spritesheets of a single movieclip, ready for multiresolution handling on mobile devices, much like TexturePacker can do. Now I could just export the single PNG files at 4x and do everything with TexturePacker, but Flash could do it with no quality loss because all the scaling and exporting would happen from vector sources, whilst TexturePacker would do it scaling down the 4x raster images. Alas apparently there is no automated way to obtain this with the spritesheet generator that comes embedded with Flash, so I am trying to put up a JSFL script.
Via JSFL I can easily export a 1x spritesheet of a library item, but I don't know how to create the 2x and 4x versions of the same spritesheet. From the documentation of the sprite sheet generator, I see that: "If you export from the Stage, any transforms (scaling, skewing, etc.) you have applied to the symbol instance are preserved in the image output." I was thinking of creating via JSFL a movieclip scaled at 2x and then one at 4x on the stage and then passing them over to the SpriteSheetExporter, but apparently the exporter can only accept symbols from the library (via the addSymbol), not instances from the Stage. It doesn't also apparently have any parameter to scale or transform the symbol before exporting the sheet, so I'm pretty stuck with this.
Anyone has come up with a solution to automate the export of multiresolution spritesheets from a Flash movieclip? Do you have any suggestion I can further investigate to accomplish this?
PS I know TexturePacker can handle directly SWF files, but this approach has some limitations. For example it cannot render correctly the frames of nested movieclips. This is why I'd like to have a full workflow to generate multi-res spritesheets directly from the Flash environment.