As for the logic you can use a looping timer to decrease the value, stopping the timer when you release the mouse button.