Search Tutorials
Actionscript: function previousSlideWe are hiding the next or previous button at first or last slide so that the user cannot go beyond and actually select a slide, which does not exist. Similarly we create the previousSlide function but this time instead of incrementing we decrement the variable i (slidenumber) by 1.
function previousSlide (firstSlide,lastSlide,slideName,slideText) {
i = i-1;
newSlide = slideHolder.loadMovie(slideName + i + ".jpg");
newText = loadVariablesNum(slideText + i + ".txt", 0);
if (i == firstSlide) {
_root.leftBut._visible = false;
}else{
_root.leftBut._visible = true;
}
if (i == lastSlide) {
_root.rightBut._visible = false;
k = 1;
}else{
_root.rightBut._visible = true;
}
_root.whiteBox._visible = true;
_root.newSlide;
_root.newText;
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|