Randomized Flash Header

Hey,

I’m having trouble thinking how to do the following with AS3 for creating a randomised Flash header on refresh. I’ve setup 5 frames in a movie clip with different artwork on each frame. I’ve then added a new layer where I want to add the code. With action script 2 my code would have been:

stop();
logovariable = random(5);
if (logovariable == 0) {
gotoAndStop(1);
}
if (logovariable == 1) {
gotoAndStop(2);
}
if (logovariable == 2) {
gotoAndStop(3);
}
if (logovariable == 3) {
gotoAndStop(4);
}
if (logovariable == 4) {
gotoAndStop(5);
}

How would I do the same thing in AS3.
Thanks bigtime for any help
Shell