sorry for the late response, if you havent figured it out yet, maybe something along the lines of on trigger set x to x+ Mouse.x2-mouse.x1
then have 2 variables to click a start and finish point, so that it changes the sprites length to the distance of the sprite, plus the difference in distance between the two clicks.
so as if it was a 4 unit box, and you clicked at 4 and 7 pixels hypothetically, the code would run 4 + (7-4) = 4+(3) and set the new length to 7. but even if you dont click exactly where the box ended the math would add up even if you clicked at 17 and 20. however if you clicked at 20 and then 17, the math would say, set x to 4 + (17-20)= 4+(-3) and set new length to 1, as 4 -3 is 1, successfully shortening your line.
an easier way to do this , though i dont know its applicable in your situation, would be to add a slide bar, and set sprite.x to slidebar.value