het moet zo zijn dat als ik de functie next aanroep dat de plaatjes in mijn html,
simpel maar ff een twee drie vier en vijf genoemd, verspringen naar de volgende vijf plaatjes
dit alles het liefst zo dat het niet uitmaakt hoeveel plaatjes ik heb
///
<script type="text/javascript">
var ImageList = new Array();
ImageList[0] = new Image(500,400);
ImageList[0].src = "Pictures/BASIC_02_02.jpg";
ImageList[1] = new Image(500,400);
ImageList[1].src = "Pictures/BASIC_02_02.jpg";
ImageList[2] = new Image(500,400);
ImageList[2].src = "Pictures/BASIC_02_02.jpg";
ImageList[3] = new Image(500,400);
ImageList[3].src = "Pictures/BASIC_02_02.jpg";
ImageList[4] = new Image(500,400);
ImageList[4].src = "Pictures/BASIC_02_02.jpg";
ImageList[5] = new Image(500,400);
ImageList[5].src = "Pictures/BASIC_02_03.jpg";
ImageList[6] = new Image(500,400);
ImageList[6].src = "Pictures/BASIC_02_03.jpg";
ImageList[7] = new Image(500,400);
ImageList[7].src = "Pictures/BASIC_02_03.jpg";
ImageList[8] = new Image(500,400);
ImageList[8].src = "Pictures/BASIC_02_03.jpg";
ImageList[9] = new Image(500,400);
ImageList[9].src = "Pictures/BASIC_02_03.jpg";
var timerID = null;
var timerRunning = false;
var minIndx = 0;
var maxIndx = 10;
var count = 0;
function Init() {
minIndx = 0;
maxIndx = ImageList.length - 1; // bepaal de hoogste waarde voor de index
count = 0
}
function previous() {
if (count < minIndx) { count = maxIndx }
if (count != 0) { count-- }
document.een.src = ImageList[count].src;
count--;
document.twee.src = ImageList[count].src;
count--;
document.drie.src = ImageList[count].src;
count--;
document.vier.src = ImageList[count].src;
count--;
document.vijf.src = ImageList[count].src;
}
function next() {
if (count > maxIndx) { count = minIndx }
if (count != 0) { count++ }
document.een.src = ImageList[count].src;
count++;
document.twee.src = ImageList[count].src;
count++;
document.drie.src = ImageList[count].src;
count++;
document.vier.src = ImageList[count].src;
count++;
document.vijf.src = ImageList[count].src;
}
</script>
knop om je tekst aan te passen.