IRremote breaking loop

I want an infinite loop to start when I hit a button on the IR remote then stop when I hit another.

case 0xFF629D: 
  for(int i = 0; i < 5;)
{
  setColor(255, 0, 0);  // red
  delay(100);
  setColor(0, 0, 255);  // blue
  delay(100);
}  
    Serial.println(" CH             "); 
    break;

I understand I should probably be using a While loop, but I was unsure how to go about it. Thanks for any help.

A task for a simple state machine. As you haven't provided your complete code I'm not able to give you detailed hints. Just take a variable that holds the state and react on that state in your main loop just doing a tiny bit of the actual work to be called again in the next loop.