Oh, and to explain /why/ the rainbow is moving…
The rainbow function can be fed an initial hue value.
fill_rainbow( leds, NUM_LEDS, initialhue);
If this initial hue value is different each time the strip is updated then the rainbow will “flow” down the strip. In your code it is being driven by the ever increasing millis time value.
fill_rainbow( leds, NUM_LEDS, millis() ); //initialhue changes over time
This can be slowed down by dividing millis, thus making the initial hue change smaller each loop.
fill_rainbow( leds, NUM_LEDS, millis()/10 ); //slower initialhue change over time
The initial hue could also be based on your own variable that is incremented or varied in some fashion:
fill_rainbow( leds, NUM_LEDS, rainbowStartColor );
rainbowStartColor = rainbowStartColor + 7;
Making this initial hue value negative will change the direction the rainbow flows.
In addition to initialhue, the fill_rainbow function can also be fed a forth variable, deltahue. This is how much the color changes from pixel to pixel. It defaults to 5, but can be set to whatever you want.
fill_rainbow( leds, NUM_LEDS, initialhue, deltahue);
So, if you want the complete rainbow, from red (value 0) all the way through the color spectrum and back to red (value 255), over a specific number of pixels it would need to be calculated. Thus:
fill_rainbow( leds, NUM_LEDS, initialhue, 256/NUM_LEDS ); //full rainbow spread over entire strip.
If you just wanted a quarter of the rainbow to show up (and have it flow over time) you could use something like this:
fill_rainbow( leds, NUM_LEDS, millis()/10, 256/NUM_LEDS/4); //displays 1/4 of rainbow
Or you could have it display the rainbow twice within a certain length by doing:
fill_rainbow( leds, NUM_LEDS, millis()/10, 256/NUM_LEDS*2); //displays two rainbows
Have fun!