hello, I'm trying to create a chain of balls that is draggable with the mouse.

Sort of like what is seen here:


My only issue is I need the chain to be anchored to a point, so the last does not move. Does anyone know an easy modification to this code, or know of a tutorial that can help with this in AS2 or AS3?