Tap even from co-ordinates of a image rather than a image / button object

Hi I have a bitmap of a grid and I want to define each square as a button, rather than draw each square on screen and define each as a button I wondered if there was a way to define a region such a 0,0 to 75,75 as a button or to generate the tap event etc
[import]uid: 5872 topic_id: 1115 reply_id: 301115[/import]

Hi,

you can draw invisible buttons on top of your bitmap instead.
Say, your grid is made of 50x50 squares, then you could build your buttons on top with:

local touchController = display.newRect(0,0,50,50)  
--make it invisible  
touchController:setFillColor(0,0,0,0)  
-- and assign the touch function to it  
touchController:addEventListener("touch", yourTouchFunction)  

You can set the touchController x,y to wherever you need.
Hope this helps.
[import]uid: 6050 topic_id: 1115 reply_id: 2858[/import]