HelpMe -AS- movement with a headphone cable!

hi,

I am stuck , i can’t figure out how to get this to work, i’m trying to make a cable swing, i’ve used some sweet code from bit101 and it works, but i neeed the top of the cable to stay fixed so the cable doesnt come apart, at the moment you can drag the cable anywhere.

i’ve attached the file, if anybody can give me any ideas on how to solve this dilemma i will be greatfull

it’s probebly simple, to simple i can’t figure it out

thank you to anyone that can help