When click the arrows, how to navigate inside the gallery instead of between the gallery?
You need to change the clickNext and clickPre function in the Portfolio.as.
From:
From:
private function clickNext(e:MouseEvent=null):void{
currentPortfolioNum++;
if(currentPortfolioNum>galleryNum-1) currentPortfolioNum = 0;
removePortfolio();
loadPortfolio(currentPortfolioNum);
}
private function clickPre(e:MouseEvent=null):void{
currentPortfolioNum--;
if(currentPortfolioNum<0) currentPortfolioNum = galleryNum-1;
removePortfolio();
loadPortfolio(currentPortfolioNum);
}
To:
// load previous portfolio when user click the previous arrow button
private function clickNext(e:MouseEvent=null):void{
/*
currentPortfolioNum++;
if(currentPortfolioNum>galleryNum-1) currentPortfolioNum = 0;
removePortfolio();
loadPortfolio(currentPortfolioNum);
*/
currentAssetNum++;
if(currentAssetNum>currentPortfolioLen -1) currentAssetNum = 0;
displayImage(currentAssetNum);
}
// load next portfolio when user click the next arrow button
private function clickPre(e:MouseEvent=null):void{
/*
currentPortfolioNum--;
if(currentPortfolioNum<0) currentPortfolioNum = galleryNum-1;
removePortfolio();
loadPortfolio(currentPortfolioNum);
*/
currentAssetNum--;
if(currentAssetNum<0) currentAssetNum = currentPortfolioLen -1;
displayImage(currentAssetNum);
}


207 Purchases
149 Comments