RGB projectwith microphone and rotary dialer

I am working on a student art installation. Here is the basic information of the project:

A mirror with 16 frames is places on top of a 22’TFT screen. A laptop runs Flash(AS3) and shows a spinning disc (like a record player disc) on the TFT screen. The disc has 16 frames and each frame has a animation on it and when rotating in flash, the mirror on top of the screen will play smooth animations (praxinoscope like).
Here is a praxinoscope in action:

We have a rotary dialer which is used to pick animations in Flash. This is done with serproxy and the messenger library (send serial reads to flash). Also, we have 4 RGB mood lamps that will change color according to the chosen animation(PWM smooth transitions). Another feature in the telephone where an electret microphone is located. When the user speaks into the phone, the RGB LEDS will go off after each other and go on again (like a visualizer).
The whole thing starts when a user comes close to the art installation. A proximity sensor will measure the distance and a t a certain distance, a ring sound will appear via FLASH to seduce people to pick up the phone and dial a number.
The process of the project can be seen at http://www.psychedelic-seduction.com
For the code of the RGB LED visualizer I am using this code:

val = analogRead(MicroPin);
  if (val < 300) {
    digitalWrite(ledPinR1, LOW); //turns led1 on, or HIGH
    delay(tim); //wait for tim miliseconds
    digitalWrite(ledPinR2, LOW); //turns led1 on, or HIGH
    digitalWrite(ledPinR3, LOW); //turns led1 on, or HIGH
    digitalWrite(ledPinR4, LOW); //turns led1 on, or HIGH
    digitalWrite(ledPinR4, HIGH);
    digitalWrite(ledPinR3, HIGH);
    digitalWrite(ledPinR2, HIGH);
    digitalWrite(ledPinR1, HIGH);

Now my question is how can I make the visualizer effect working together with the chosen RGB color by the user when he rotates the dialer? The dialer has 10 digits and each one is responsible for a different color that all 4 RGBs will change to when dialed. The microphone is still active and the visualizer effect should still work but with the chosen color.

Thanks in advance.