Touch joint problem

I am trying to make a ball swing across the screen and when you touch the screen, the camera (localGroup) follows, well I am having two problems, first, when the ball is to the right too far, and i touch to make a joint, the joint doesn’t connect to where you touch, but instead at the beginning of where the ball started. The second problem is trying to make a line appear and be at the angle of the joint so it looks like a rope. Thank you for any help!!! Here is my code: [code] local physics = require “physics”
physics.start()
local localGroup = display.newGroup()
local ball = display.newCircle(40, 100, 10)

physics.addBody(ball, “dynamic”, {bounce=.2, friction=.2, density=.2})

– draw the line and make the joint
local function drawLine(event)
if (event.phase == “began”) then

line = display.newLine(ball.x, ball.y, event.xStart, event.yStart)

localGroup:insert(line)
myJoint = physics.newJoint(“touch”, ball, event.x, event.y)
line.rotation = myJoint.jointAngle

elseif (event.phase == “ended”) then

myJoint:removeSelf()

end

end

Runtime:addEventListener(“touch”, drawLine)
– move Camera
local function moveCamera()
if ball.x > 200 then
localGroup.x = - ball.x + 200

end
end

Runtime:addEventListener(“enterFrame”, moveCamera )

–local function delete()
– if ball.y > 300 then
– ball:removeSelf()
–end
– end
–Runtime:addEventListener(“enterFrame”, delete)

localGroup:insert(ball)

return localGroup [import]uid: 38977 topic_id: 20364 reply_id: 320364[/import]