Hi all,
I'm trying to export multiresolution spritesheets from, say, a library item via JSFL.
What I want to achieve is the correct 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 could 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, 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 how should I go about this?
Thanks for any sugggestion!