Hi Paul
Sorry, I lost my code moving from machines.
I've copied it below, though I'm still writing the functions.
I'm - obviously - not the best at coding but I can usually get my head around code once I figure out what it does.
This code is really basic but it makes sense to me

I just loops to variable anim based on the code from the remote, then runs the corresponding function.
Currently it would have to wait for the function to finish before starting the loop again, probably missing the read, I was hoping I could interrupt the current function, read the code from the remote, increment or decrement anim and then run the corresponding function.
[code]#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
irrecv.enableIRIn(); // Start the receiver
}
int anim = 1;
unsigned long last = millis();
void loop() {
if (irrecv.decode(&results)) {
// If it's been at least 1/4 second since the last
// IR received, toggle the relay
if (millis() - last > 250) {
if (results.value == 0x4cb92) { // Sony DVD play
anim + 1;
}
else if (results.value == 0x1cb92) { // Sony DVD stop
anim - 1;
}
}
last = millis();
irrecv.resume(); // Receive the next value
}
if (anim = 0) { // looping anim if it goes below 1
anim = 4;
}
else if (anim = 5) { // looping anim if it goes above 4
anim = 1;
}
else if (anim = 1) {
// run function 1
}
else if (anim = 2) {
// run function 2
}
else if (anim = 3) {
// run function 3
}
else if (anim = 4) {
// run function 4
}
}
[/code]