Ninja Rope?

I was wondering how you create a ninja rope? Like when you press the mousebutton on a wall or a roof, and a string hits the wall and you can swing, kind of like spiderman.

I’m trying to create something like this, exept for that you shoot the rope with the mousebutton instead of space.
[COLOR=#22229c]http://members.optushome.com.au/chrisrhodes/swing.html[/COLOR]

If you guys could help me, that would be great.

Thanks in advance.

Greatfaith