Thank you very much, although this doesn’t seem to be working. Here is my code with your implementation in it.
[code]
local function ScrollBoard(event)
local phase = event.phase
if(event.phase==“began”) then
board:setReferencePoint(display.CenterReferencePoint)
display.getCurrentStage():setFocus( board )
board.isFocus = true
board.x0 = event.x - board.x
board.y0 = event.y - board.y
elseif(event.phase==“moved”) then
if board.isFocus then
if “moved” == phase then
board.x = math.min(320 - (board.contentWidth/2), math.max(0 + (board.contentWidth/2), event.x - board.x0))
board.y = math.min(480 - (board.contentHeight/2), math.max(0+ (board.contentHeight/2), event.y - board.y0))
end
end
elseif “ended” == phase then
display.getCurrentStage():setFocus( nil )
end
end
local function makeBoard()
board=display.newGroup()
local counter=0
for y=1, ROWS, 1 do
for x=1, COLS, 1 do
counter = counter + 1
local slot = makeTileSocket()
slot.x = (x) * SLOT_SIZE
slot.y = (y) * SLOT_SIZE
slot.id = counter
board:insert(slot)
end
end
board.x = SLOT_SIZE/2
board.y = SLOT_SIZE/2
– Center the View on the Center of the Board
board.x = board.contentCenterX
board.y = board.contentCenterY
board:addEventListener(“touch”, ScrollBoard);
end
[/code] [import]uid: 72600 topic_id: 14031 reply_id: 51711[/import]