Is this possible to loop?

Look at the blink without delay examples.
Remember if you do something if a button is pressed for a certain time then you have to wait for a button up to occur in less than that time to engage the original function.