Hello…
I have a simple board. with a for i loop and for j loop.
works great.
I need to be able to identify each rectangle to apply properties
rect.alpha = .5
rect.x = 300 and so on
I can identify the bottom row
and each colume
but that is as far as I got
Please I need your help, and thank you for all your time.
This is all I have
local pin = {} function createBoard1() for i = 1, 6 do for j = 1, 6 do local aPin = display.newRect( sceneGroup, 0, 0, 130, 40 ) pin[i] = aPin aPin.x = 145 \* (i + .15) aPin.y = 50 \* (j + 5.5) aPin.myID = (i - 1) \* 6 + j aPin.touch = onTouch aPin:addEventListener( "touch" ) end end end createBoard1() pin[6].alpha = .2
In the terminal, if I touch each rect… I can see numbers 1 to 36
so each one has a number… In my touch function I can change
each of them, but I want to change them before the function
when I create the objects…