Script to automatically play more then one movie clip

What I did so far can be seen at www.chrisribar.com/serviceleads/

The problem I have is that it does turn the first button on when the movie starts. Due to this, it does not play the ‘out’ of the first slide. The script I used is:

currentButton = null;
firstButtonPress = true;

function buttonCheck(n) {
buttonCollection[‘b’+n].onRollOver = function(){
this.gotoAndPlay(‘in’);
};
buttonCollection[‘b’+n].onRollOut = function(){
this.gotoAndPlay(‘out’);
};
buttonCollection[‘b’+n].onPress = function(){
this.gotoAndPlay(‘press’);
this.enabled = false;
buttonPressed(n);
};
}

function buttonPressed(n) {
if (firstButtonPress == true) {
mainClip.gotoAndPlay(“pageIn”+n);
firstButtonPress = false;
} else {
buttonCollection[‘b’+currentButton].gotoAndPlay(‘out’);
buttonCollection[‘b’+currentButton].enabled = true;
mainClip.gotoAndPlay(“pageOut”+currentButton);
}
currentButton = n;
}

for (z=0; z<6; z++) {
buttonCheck(z);
}

In the mainClip movie clip, the last frame of the ‘Out’ plays this script:

gotoAndPlay(“pageIn”+_parent.currentButton);

telling the clip to play the next ‘In’

If anyone could help I would greatly appreciate it. Thanks!

currentButton = null;
firstButtonPress = true;

buttonCollection.b0.gotoAndPlay(“press”)
buttonCollection.b0.enabled = false;
buttonPressed(buttonCollection.b0);
};

is this what you are looking for?
.
.
.

it still doesn’t work…now the first button is permanetly disabled

unction buttonPressed(n) {
if (firstButtonPress == true) {
mainClip.gotoAndPlay(“pageIn”+n);
firstButtonPress = false;
} else {
buttonCollection[‘b’+currentButton].gotoAndPlay(‘out’);
buttonCollection[‘b’+currentButton].enabled = true;
mainClip.gotoAndPlay(“pageOut”+currentButton);
}
this look wrong

i think I need to see the fla to make sense, sounds like you code is all over the place