The description of the parameters above is clearly wrong. It should probably say something like:
- path A string, expressed as a file:/// URI, that specifies the path and name of the exported spritesheet image file.
- imageFormat A string specifying the file format of the image file ("PNG" or "JPG" is what I've succeded in using so far).
- writeMetaData Optional. A boolean specifying whether or not a external file containing the spritesheet metadata should be generated. Defaults to true.
Also, the spritesheet images always seem to come with solid backgrounds, even for PNG's, which needless to say make them useless in many (well, most) cases. My guess is that this is a bug. But, if this is expected behavior, and there is a way to get transparent backgrounds, the documentation should be updated to include this information.
Hi maki99, sounds like you've had more luck with this than I have.
Even with a valid URI path and "PNG" imageFormat, I still get this error:
exportSpriteSheet: Argument number 1 is invalid.
Do you know if there are any nuances with the URI path value?
Also regarding solid backgrounds, try these values for the imageFormat: RGBA8888, PNG32
Hi samahn,
Re the "Argument 1" error, I just responded to your forum query: http://forums.adobe.com/thread/1037600.
Neither "RGBA8888" nor "PNG32" are accepted as the imageFormat parameter.
Thanks
As 'aviPro' had found out (http://forums.adobe.com/message/4780696#4780696), the second parameter can have more choices:
{
format:"png"
, bitDepth:32
, backgroundColor:"#00000000"
}
This is how you can get the transparent background for example.
North America
Europe, Middle East and Africa
Asia Pacific