Trouble loading image sheet data file

I am new to Corona, but am loving it and am close to finishing my first game.

I have the new image sheet working in my game using the simple technique outlined in the tutorial on this site. I am using

[code]local options =
{
– The params below are required

width = 52,
height = 52,
numFrames = 104,

– The params below are optional; used for dynamic resolution support

sheetContentWidth = 1024, – width of original 1x size of entire sheet
sheetContentHeight = 1024 – height of original 1x size of entire sheet
}[/code]

This works, but now I have some graphics in there that are different sizes and I would like to change it so it loads this info into options from the external lua file created by texture packer. I’m not sure how to load that data into the variable options.

Here is a look at a little section of the data from texture packer.

--  
-- created with TexturePacker (http://www.texturepacker.com)  
--  
-- $TexturePacker:SmartUpdate:45d49ca85ba9dcb45b621027336e4bc0$  
  
local sheet =  
{  
 frames = {  
  
 { x=2, y=2, width=50, height=50 }, -- a\_normal  
  
 { x=54, y=2, width=50, height=50 }, -- a\_secondary  
  
 { x=106, y=2, width=50, height=50 }, -- a\_selected  
  
 { x=158, y=2, width=50, height=50 }, -- a\_stacked  

Any help would be appreciated.

Thank you
[import]uid: 117787 topic_id: 24895 reply_id: 324895[/import]

Has anyone had to do this? Maybe I’m not explaining it well.

I have a letters.lua file that came from tecturepacker. below is a bit of it for example:

[code]local sheet =
{
frames = {

{ x=2, y=2, width=50, height=50 }, – a_normal

{ x=54, y=2, width=50, height=50 }, – a_secondary

{ x=106, y=2, width=50, height=50 }, – a_selected

{ x=158, y=2, width=50, height=50 }, – a_stacked

{ x=210, y=2, width=50, height=50 }, – b_normal

{ x=262, y=2, width=50, height=50 }, – b_secondary

{ x=314, y=2, width=50, height=50 }, – b_selected

{ x=366, y=2, width=50, height=50 }, – b_stacked[/code]

Now this .lua file is long and I don’t want it in my main game document. I would like to leave it as a separate file and use it with the new image sheet api.

But I don’t know how.

I’ve read all the tutorials on the website using the image sheets, but none of them show how to use an external file. They all have it as local options = right in the document.

Please, if anyone can help me.

Thank you [import]uid: 117787 topic_id: 24895 reply_id: 102112[/import]