Looping until a button is pressed

Thankyou for the answers. The code you posted does do what i want it to do. Is there a way to start the other loop at any time ? Currently i can start the other loop when the current one ends.