do/while in case switch

Hi everyone.
I have been working on a project for about a month and inching my way through. I just started learning programming and finished the book by Simon Monk and am having a blast discovering new things.
My project involves using a IR remote control to select from 2 or 3 different patterns of 4 led bulbs.
I am using the IRremote.h library and it works great. So far I have been successful in making the LED's power up as designed and I can change from my default mode (all LEDs on) to button-one selection which has them turn on -without delay() - in sequence.
I am using a do-while control imbedded in switch/case to keep the sequence going until I push another button however it freezes in that mode and cannot receive another signal during execution of that do-while loop. I am pretty sure that it is due to the " while (results.value=true);"
command but I'm not sure how else to write that. Basically I want to allow a new button to change to a different pattern but my IR signal is being blocked from execution.
My code it below. Please excuse my amateur style.
Any ideas?

#include <IRremote.h>

/*

 This set up it with 4 LEDs and one remote control. 
 Must have IRremote.h from Library download from https://github.com/shirriff/Arduino-IRremote

*/

#include <IRremote.h>

int RECV_PIN = 8;              // pin 8 connected to left(OUTPUT) pin of IR sensor 
int redPin = 3;               //RED  LED mode indicator 
int firstLEDPin = 4;           // LED connected to digital pin 4
int secondLEDPin = 5;         // LED connected to digital pin 5
int thirdLEDPin = 6;          // LED connected to digital pin 6
int fourthLEDPin = 7;         // LED connected to digital pin 7

IRrecv irrecv(RECV_PIN);

decode_results results;
boolean poweredOn = false;

//-------------------button 1 test declarations below--------------
// we'll need some variables 
// first an array of our led pins declared globally
const byte ledPin[] = {
  5,6,7};   // I don't like to make the variable plural 
// how many leds do we have
byte ledCount = sizeof(ledPin) / sizeof(ledPin[0]);
// now the sequence
const byte sequence[] = {
  0,1,2};
// it will help to know how many elements this array holds
byte sequenceCount = sizeof(sequence) / sizeof(sequence[0]);
// time between changes 
const unsigned long duration = 1000; // it's best to use unsigned longs with timing variables


//---------------------------void setup()-----------------------------------

void setup()

{
  Serial.begin(9600);
  unsigned char i;
  for(i=1;i<=7;i++) //set pins 1-11 as output
    pinMode(i,OUTPUT); 
  pinMode(redPin, OUTPUT);

  senseFlash(); //Called senseFlash() Red LED flashes fast. Means IR signal was sensed
  //Below is to turn on all lights on setup incase the battery is low on the IR remote
  allOn();

  irrecv.enableIRIn(); // Start the receiver


  pinMode(RECV_PIN, INPUT); //sets pin 8 as input
}


//----------------------------------void loop()------------------------------------------------
void loop() {

  if (irrecv.decode(&results)) {
    long int decCode = results.value;
    Serial.println(decCode);

    switch (results.value) {

      //--------------------------Button 0 (power On/Off button)---------------------------------
    case 16753245: //Button 0 (Power button)  pressed
      senseFlash(); //Called senseFlash() Red LED flashes fast. Means IR signal was sensed

      if (poweredOn == true) {
        allOff();  //call allOff function. Turns all LEDs off
        poweredOn = false; 
        idleFade();                        //slowly fades red LED in/and out
      }

      else if(poweredOn == false) {
        allOn();   //call allOn function. Turns all LEDs on
        poweredOn =true;  
      }

      break;
      //--------------------------Button 1---------------------------------
    case 16724175: //Button 1 pressed
      senseFlash();                         //Called senseFlash() Red LED flashes fast. Means IR signal was sensed
      Serial.println("Button 1");          //displays "button 4" on serial monitor
      allOff();                            //turn off any leftover lights before starting new pattern.
      digitalWrite(firstLEDPin, HIGH);
      do
      {

        static byte pointer = 0; // we'll use this to point to the current sequence
        static unsigned long lastChangeTime = 0; // for timing purposes
        unsigned long currentTime = millis();

        // we'll display all the leds then advance the pointer if it's time to
        {
          if (currentTime - lastChangeTime > duration)

          {
            // we have to remember this time
            lastChangeTime = currentTime;
            // basically all leds are off except one
            for (byte index = 0; index < ledCount; index++)
            {
              if (index == sequence[pointer]) digitalWrite(ledPin[index], HIGH);
              else  digitalWrite(ledPin[index], LOW);
            }
            pointer = ++pointer % sequenceCount;       // this will roll the pointer over to display the sequence again
            poweredOn=true;                      //sets mode key for the powerbutton toggle 'if' statement

          }
        }
      }
      while (results.value=true);

      break; 

      //--------------------------Button 2---------------------------------
    case 16718055: //Button 2 pressed
     senseFlash();                         //Called senseFlash() Red LED flashes fast. Means IR signal was sensed
      Serial.println("Button 3");            //displays "button 6" on serial monitor
      poweredOn=false;                         //sets mode key for the powerbutton toggle 'if' statement
      allOff();

      break;


    }

    irrecv.resume();                             // Receive the next value

  }

}
//-----------------------------Called Functions ---------------------------------------


//--------------------------------void allOn()---------------------------------------
void allOn()                                   // turn on all lights 
{
  unsigned char i;
  for (i=4;i<=7;i++)
    digitalWrite(i, HIGH); 
}

//------------------------------ void allOff()---------------------------------------              
void allOff()                                 // turn off all lights 
{
  unsigned char i;
  for (i=4;i<=7;i++)
    digitalWrite(i, LOW); 
}
//------------------------------------void senseFlash()-------------------------------------------------
void senseFlash()                  //This function is to acknowledge the fact that the IR reciever did recieve the signal. Red LED flashes fast. 
//Uses delay() but only for a short time so no real hang up.
{
  int flashSpeed = 50;              //Red LED delay speed 

  digitalWrite(redPin, HIGH);      // Red LED flashes fast. Means IR signal was sensed 
  delay (flashSpeed);
  digitalWrite(redPin, LOW);
  delay (flashSpeed);
  digitalWrite(redPin, HIGH);
  delay (flashSpeed);
  digitalWrite(redPin, LOW);
  delay(flashSpeed);
  digitalWrite(redPin, HIGH);
  delay (flashSpeed);
  digitalWrite(redPin, LOW);
  delay (flashSpeed);
  digitalWrite(redPin, HIGH);
  delay (flashSpeed);
  digitalWrite(redPin, LOW);
  delay (500); 
}

//--------------------------------void idleFade()--------------------------------------


void idleFade()   {
  const int del = 10;
  for (int p=0; p<=100; p++)
  {
    analogWrite(redPin, p);
    delay(del);   
  }
  for (int r=100; r>=0; r--)
  {
    analogWrite(redPin, r);
    delay(del); 
  }


}

I am pretty sure that it is due to the " while (results.value=true);"

= is for assignments. == is for equality testing.

Thanks both of you.
I thought about the "double" == as equality testing. However I changed it and then it doesn't loop at all. Hmm. Now I'm really stumped.
How can I code it so that it will remain in that case loop until I select another button?

for(i=1;i<=7;i++) //set pins 1-11 as output
    pinMode(i,OUTPUT);

Nice comment.

for(i=1;i<=7;i++) //set pins 1-11 as output
pinMode(i,OUTPUT);
Nice comment.

AWOL.
Hah, Sorry about that! That's what happens I guess when you modify and cut/paste and forget to change things in the comments!

Vaclav,
I tried running your corrections and still wasn't able to exit out of "case 16724175"
Maybe I am misunderstanding you. (quite possible as I just started Arduino!) But I copied and ran your edited sketch, and first thing is it ran right into the setUp() script then straight into the sequencing loop. I discovered that you had commented out a few lines and maybe that was your intent. However my puzzle is how do I exit and try button 2?

Yeah, I did miss your comments about modification so it would compile for you. I went ahead and fixed the areas that you commented out.
I guess really wasn't having problems with the "while" code except how to graciously get out of it.
While in the loop, my IR receiver is not sensing my transmitter because there is something blocking it from another button push.
This is why I used a blink with out delay() function in the button 1 case. So for some reason I am not able to interrupt the loop and change cases whilst in that 'while' code.
My button 2 selection or button 0 (power button) would turn them all off or go to another pattern yet to be written. Right now I have it so button 2 turns them all off.
My power button is working very well however before I select button 1. But once I push button 1 it runs through the code nicely but won't allow further button selections.

That's what happens I guess when you modify and cut/paste and forget to change things in the comments!

That happens with useless comments. Learn to delete useless comments.

Quote
That's what happens I guess when you modify and cut/paste and forget to change things in the comments!
That happens with useless comments. Learn to delete useless comments./quote]

PaulS,
Not sure what you mean by that last statement, as just about every sketch I have seen in my very short exposure to programming and Arduino, have had those types of comments in them. I keep them in possibly more for my benefit so I can remember how all this goes together. When I get better at this surely I'll pare it down so that it looks more presentable to all, but for now I'm trying to find answers to my original question.

Not sure what you mean by that last statement, as just about every sketch I have seen in my very short exposure to programming and Arduino, have had those types of comments in them. I keep them in possibly more for my benefit so I can remember how all this goes together.

That comment was directed at Vaclav, who blindly copies and pastes code.