Help needed dynamic menu

basically i have tried to follow a tutorial as i am used to using dreamweaver but this time needed to use flash… i have created all the components and am trying to put together the actionscript to create the dynamic menu and then link the pages… Here is a link to what the tutorials website looks like:

http://www.flash-game-design.com/fla...edWebsite.html

And this is a link to the tutorial:

http://www.flash-game-design.com/fla…-tutorial.html

I think the crux of the situation comes down to the fact that i am using 5 pages instead of 3 in the tutorial and do not know where this should be edited on the actionscript to make it work…

Here is the actionscript:

menu = [“Home”, “The Apartment”, “The Location”, “Pricing”, “Contact”];
this.createEmptyMovieClip(“content”, 1000);
this.attachMovie(“sectionBackground”, “mask”, 1001);
mask._y = content._y=208;
mask._x = target=68;
content.setMask(mask);
content._x = -1000;
imageScrollSpeed = 5;
xStart = 125;
yStart = 51;
bWidth = 139;
bHeight = 17;
interval = 50;
countDown = menu.length;
menuOpen = false;
theTime = 0;
buttonScrollSpeed = 2;
for (var i = 0; i<menu.length; i++) {
var section = content.attachMovie(“section_home”+menu*, “section_The Apartment”+menu*, “section_The Location”+menu*, “section_Pricing”+menu*, “section_Contact”+menu*, i+100)
section._x = section._width1;
var b = this.attachMovie(“subButton”, “subButton”+i, countDown);
countDown–;
b.stop();
b._x = xStart;
b._y = yStart;
b.interval = interval
1;
b.target = yStart+(bHeighti);
b.txt = menu
;
b.pos = target+(i*-section._width);
b.onPress = function() {
target = this.pos;
closeMenu();
this.gotoAndStop(1);
};
b.onRollOver = function() {
this.gotoAndStop(2);
};
b.onRollOut = function() {
this.gotoAndStop(1);
};
}
function closeMenu() {
for (var i = 0; i<menu.length; i++) {
var b = this [“subButton”+i];
b._visible = false;
b._x = xStart;
b._y = yStart;
}
menuOpen = false;
}
mainButton.OnPress = function() {
if (!menuOpen) {
theTime = getTimer() ;
menuOpen = true;
for (var i = 0; i<menu.length; i++) {
_root.main[“subButton”+i]._visible = true;
}
} else {
closeMenu();
}
};
function scrollButtons() {
if(menuOpen) {
for (var i = 0; i<menu.length;i++) {
var b = this[“subButton”+i];
if ((theTime+b.interval)<getTimer()) {
b._y += (b.target-b._y)/buttonScrollSpeed;
}
}
}
}

THe idea of the website is so that the menu is created dynamically and then in the actionscript set up into the drop down subButtons and linked with the content which scrolls in and out… Once again have posted what the tutorials should look like…

Think what i have wrong is only in the actionscript however will send .fla if need be… this would be AMAZING if it could get resolved…

So if anyone could help it would be SOOOOOOOOOO appreciated…

PLEASE,

many thanks, jack