Hello,
I have a newbie question regarding the dragging of an image group.
I loaded six images and added them to a group
local p1 = display.newImage( "image-1.png" )
p1.x, p1.y = 0, 0
local p2 = display.newImage( "image-2.png" )
p2.x, p2.y = 0, 150
local p3 = display.newImage( "image-3.png" )
p3.x, p3.y = 0, 300
and so on for the other five images.
local group1 = display.newGroup()
-- set the group's position
group1.x, group1.y = centerX, centerY
-- insert the object into the group
group1:insert( p1 )
...
The dragging I achive using this code:
local function draggoup1 (event)
group1.x = centerX
group1.y = event.y
end
group1:addEventListener ("touch", draggoup1)
The bar of pictures can now be dragged along the y axis. This works well. The problem I have is that when the bar has been dragged and is then touched again the starting point for the drag action is obvioulsy where the user touches the bar. How can this be avoided?
Will I have to make event listeners for each image instead for the group?
I would like to use several draggable bars side by side, so I think I ccannot use a scrolling widget.
Another question is how can I achieve the effect that the bar will move a little further in the direction of the drag, i.e. using easing and friction? I knew how to do this in flash but I did this a few years ago and I just cant remember how it was done. I think I used the greensock library 
thank you
Frank [import]uid: 41769 topic_id: 25615 reply_id: 325615[/import]
