you have a angry birds example in construct itself, its called catapult , and the code for the distance used in it is this
min(distance(mx, my, mouse.X, Mouse.Y) / 3, 100) the number 100 is the length of the band to be stretched, the mx , my is the mouse x mouse y when mouse was initialy pressed, u could better use it from example cause this is not completed u need 1 aditional code for it to work properly and add the impulse