display.setDefault( "anchorX", 0 ) display.setDefault( "anchorY", 0 ) -- Your code here local tilesGroup = display.newGroup() t ={} for i=1,6 do for j=1,6 do local item = display.newCircle(tilesGroup,32\*i-32, 32\*j-58, 16) table.insert( t, item) end end -- tilesGroup.x = display.contentCenterX/2 tilesGroup.y = display.contentCenterY/2 -- local circ = display.newCircle(0, 0, 32) circ:setFillColor( 0.5 ) circ.name = "circ" local function tapListener( event ) local object = event.target print( "TAP"..object.x..object.y.."index="..object.index) end item:addEventListener( "tap", tapListener )
How do i get or interact with the desired object in the table?