help with moving a display group

i have a group called gameboard that i need to move around the screen the first time i touch the group it moves perfect no matter where i touch the group any time after the first time when i touch the group the group will jump a little then start moving how do i get it to not jump first. this is the function im using to do the moving
[blockcode]
function fnPan(event)
if event.phase == “began” then
print(“PAN”)
gameboard.xReference = event.xStart
gameboard.yReference = event.yStart
elseif event.phase == “moved” then
print(“MOVED”)
gameboard.x = event.x
gameboard.y = event.y
elseif event.phase == “ended” then
print(“ENDED”)
end
end
[/blockcode] [import]uid: 7911 topic_id: 7383 reply_id: 307383[/import]

You need to use delta values. [import]uid: 3953 topic_id: 7383 reply_id: 26068[/import]

thanks
can you point me at some examples for using delta [import]uid: 7911 topic_id: 7383 reply_id: 26072[/import]

Record touch.x and y on phase == “began” (as you already have), then on phase == “moved”:

Something like:

[code]

– On phase == “moved”:

gameboard.x = gameboard.x + (event.x - event.xStart) – << that’s the delta to add

[/code] [import]uid: 3953 topic_id: 7383 reply_id: 26168[/import]

Thanks I think I tried that last night but didn’t get the effect I was looking for anyway I got it to work by adding localToContent to the began and the ended phase I’ll post code later in case if someone else is trying to get the effect I was
Now the next problem how to compensate if I scale the group to double it’s size [import]uid: 7911 topic_id: 7383 reply_id: 26190[/import]