Draw Lines from objects and moving along the lines.

Hello!

I got some stuff up and running but I am ranning into a road block. I have X number of drag-able objects that I am dragging during their touch events. Here is that function

local function onTouch( event )

local t = event.target
local phase = event.phase
if “began” == phase then
– Make target the top-most object
local parent = t.parent
parent:insert( t )
display.getCurrentStage():setFocus( t )
t.isFocus = true
– Store initial position
t.x0 = event.x - t.x
t.y0 = event.y - t.y
elseif t.isFocus then
if “moved” == phase then
t.x = event.x - t.x0
t.y = event.y - t.y0
elseif “ended” == phase or “cancelled” == phase then
display.getCurrentStage():setFocus( nil )
t.isFocus = false
end
end
return true
end

Next I would like to be able to draw a line from the objects(can be enabled with a button) and have the objects move alone the line that was drawn from them. So, it is very much like drawing a football route that a player (object) will run.

Please help me here. I have looked at the Martian Control(which is recommended by most on the forum) and others to no avail.

Thanks,

Willy J.
[import]uid: 66859 topic_id: 10969 reply_id: 310969[/import]

any takers on this?

Thanks,

Willy J.
[import]uid: 66859 topic_id: 10969 reply_id: 39974[/import]