i am building this flash site:
http://www.dw20.co.uk/index2.php
the code below is building content from elelments in my library, i have the content all loaded up and as you can see you scroll through each page using the navigation bar. now the problem i have is that under the 'portfolio page is other pages loaded vertically. so what i want to be able to do is by clicking a thumbnail on the ‘portfolio’ page it scrolls vertically to the desired page like it does with the main menu.
the code used is:
menu = ["Home", "Portfolio", "About", "Contact"];
portfolio = ["UPKS", "Rocks", "Cardiff"];
this.createEmptyMovieClip("content", 1000);
this.attachMovie("sectionBackground", "mask", 1001);
mask._y = content._y = 45;
mask._x = target = 20;
content.setMask(mask);
content._x = -1000;
imageScrollSpeed = 5;
xStart = 20;
yStart = 45;
bWidth = 860;
bHeight = 25;
interval = 50;
countDown = menu.length;
menuOpen = false;
theTime = 0;
buttonScrollSpeed = 2;
for (var i = 0; i<menu.length; i++) {
var section = content.attachMovie("section_"+menu*, "section_"+menu*, i+1200);
section._x = section._width*i;
var b = this.attachMovie("subButton", "subButton"+i, countDown);
countDown--;
b.swapDepths(content);
b.stop();
b._x = xStart;
b._y = yStart;
b.interval = interval*i;
b.target = yStart+(bHeight*i);
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);
};
b._visible = false;
}
for (var i = 0; i<portfolio.length; i++) {
var portfolio_section = content.attachMovie("portfolio_"+portfolio*, "portfolio_"+portfolio*, i+1500);
portfolio_section._x = 860;
portfolio_section._y = (portfolio_section._height*i)+435;
}
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;
}
}
}
}
this.onEnterFrame = function() {
content._x += (target-content._x)/imageScrollSpeed;
scrollButtons();
};
if anybody could help with this then i would be most greatful.