Sprite Packing tool

I am currently working on updating a sprite packing tool that I built for the Sparrow Framework, to also play nice with Corona. It would be really nice to get some feedback on what would be useful.

The current tool is here:
http://pixelrevision.com/8bit/texture_atlas_creator/
It will take a swf file with multiple named movieclips and export an image with xml and json to use as the maps. I have found it very helpful to have 1 fla file to manage library items with. There is an example file you can try at the bottom of the page to see what I am doing and try it out with.

As it is now the JSON could be parsed with something like http://json.luaforge.net/ and converted, but I was wondering if I should not just also generate a lua file in the zip to avoid having to do this. My thought is I could provide a factory of sorts like is found at:
http://developer.anscamobile.com/reference/sprite-sheets
Where function getSpriteSheetData() would include the name of the clip you wanted to create.
Example:
local spriteData = test.getSpriteSheetData(“mario”)

My questions are:

  1. Would it make sense to try to break this out so that instead of getting the data for the spritesheet it just returned an entire clip based on the data with all of the frame labels included? Or is doing it this way simpler and more flexible.
  2. If not a full factory would it make sense to get frame labels by name with a method for use with newSpriteSet()?
    Example:
    getFramesForLabel(“mario”, “frameLabel”)

Any feedback would be greatly appreciated.
[import]uid: 4555 topic_id: 6202 reply_id: 306202[/import]

Updated:
http://pixelrevision.com/8bit/texture_atlas_creator/
I have added in lua generation for this tool in case people want to use it.
To use:

  1. Download the example file at the bottom of the page.
  2. Upload the sample_for_atlas.swf into the tool.
  3. Click the save button and save.
  4. Unpack the zip, and copy sprite_sheet.lua and sprite_sheet.png into your corona project.
  5. To test the example:
sprite = require("sprite")  
require "sprite\_sheet"  
local instance = getInstanceByName("mario", 2)  
instance:prepare("fly2")  
instance.x = 100  
instance.y = 100  
instance:play()  

This will play the framelabel of fly2 of the mario clip in the fla at 2 frames per second.

For me this greatly simplifies managing sprite assets as I can just keep an fla with all of the names, assets, and animations, and have access to them with 1 line of code. If there is any interest or feedback on this I will go in and optimize the lua it generates.
[import]uid: 4555 topic_id: 6202 reply_id: 21462[/import]