Hi everyone…
I have this for loop, and it works great
local clefTable = {} local index = 0 for row = 1, 4 do for column = 1, 6 do local clefKey = display.newImageRect("images/trebleClef.png", 71, 182) clefKey.x = (row \* 120) -12 clefKey.y = column \* 100 clefTable[index] = clefKey clefTable[index].index = index end end
But i just want to make the four images for the rows, no columns, i put 0, and 0 like this:
local clefTable = {} local index = 0 for row = 1, 4 do for column = 0, 0 do local clefKey = display.newImageRect("images/trebleClef.png", 71, 182) clefKey.x = (row \* 120) -12 clefKey.y = column \* 100 clefTable[index] = clefKey clefTable[index].index = index end end
It’s that the right way, or correct way?
or this there another way of doing images just in rows?
Thanks
Victor