Warum lädt der Preloader nicht zu ende?

Kategorien: C/C++, Java, VB, ...
1 Antwort
Koka
Koka am Freitag, 23. April 2004 um 22:41
hi ich habe das problem, dass auf meiner seite, www.4thcube.de.vu der preloader immer nach 7/18 abbricht... ist das bei euch auch so? was ist denn falsch an dem code? <script language=JavaScript1.2> <!-- begin hiding startingColor = new Array() // <-- NICHT VERÄNDERN! endingColor = new Array() // <-- NICHT VERÄNDERN! // Hier deine Grafiken rein: var yourImages = new Array("Bilder/STRAND.jpg","Bilder/hdr.jpg","Bilder/bild_box_1.gif","Bilder/bild_box_2.gif","Bilder/bild_box_3.gif","Bilder/carrera1.jpg","Bilder/carrera2.jpg","Bilder/cube#4_01.gif","Bilder/cube#4_02.gif","Bilder/cube#4_03.gif","Bilder/cube#4_04.gif","Bilder/cube#4_05.gif","Bilder/cube#4_06.gif","Bilder/cube#4_07.gif","Bilder/cube#4_08.gif","Bilder/cube#4_09.gif","Bilder/cube#4_10.gif","Bilder/org_cube#4_01.gif") // Ersetzen und erweitern durch deine Grafiken6 var locationAfterPreload = "http://www.koka.board-galaxy.info/koka_php/4thcube/index.html" var preloadbarWidth = 450 // Länge des Balkens var preloadbarHeight = 1 // Höhe desselbigen var backgroundOfGradient = "#000000" // Farbe mir der der Balken beginnt! Gib erste, dritte und fünfte Zahl/Buchstaben der Farbe an startingColor[0] = "F" startingColor[1] = "f" startingColor[2] = "f" // Wie oben nur die Farbe mit dem es endet endingColor[0] = "9" endingColor[1] = "9" endingColor[2] = "9" var gap = 4 // mind. 2! verändern, wenn es nen JS-Error gibt. // NIX MEHR VERÄNDERN if (!document.all) location.replace(locationAfterPreload) var a = 10, b = 11, c = 12, d = 13, e = 14, f=15, i, j, ones = new Array(), sixteens = new Array(), diff = new Array(); var convert = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"), imgLen = yourImages.length; var loaded = new Array(), preImages = new Array(), currCount = 0, pending = 0, h = 0, hilite = new Array(), cover = new Array(); var num = Math.floor(preloadbarWidth/gap); for (i = 0; i < 3; i++) { startingColor = startingColor.toLowerCase(); endingColor = endingColor.toLowerCase(); startingColor = eval(startingColor); endingColor = eval(endingColor); diff = (endingColor-startingColor)/num; ones = Math.floor(diff); sixteens = Math.round((diff - ones)*15); } endingColor[0] = 0; endingColor[1] = 0; endingColor[2] = 0; i = 0, j = 0; while (i <= num) { hilite = "#"; while (j < 3) { hilite += convert[startingColor[j]]; hilite += convert[endingColor[j]]; startingColor[j] += ones[j]; endingColor[j] += sixteens[j]; if (endingColor[j] > 15) { endingColor[j] -= 15; startingColor[j]++; } j++; } j = 0; i++; } function loadImages() { for (i = 0; i < imgLen; i++) { preImages = new Image(); preImages.src = yourImages; loaded = 0; cover = Math.floor(num/imgLen)*(i+1) } cover[cover.length-1] += num%imgLen checkLoad(); } function checkLoad() { if (pending) { changeto(); return } if (currCount == imgLen) { location.replace(locationAfterPreload); return } for (i = 0; i < imgLen; i++) { if (!loaded && preImages.complete) { loaded = 1; pending++; currCount++; checkLoad(); return; } } setTimeout("checkLoad()",10); } function changeto() { if (h+1 > cover[currCount-1]) { var percent = Math.round(100/imgLen)*currCount; if (percent > 100) while (percent != 100) percent--; if (currCount == imgLen && percent < 100) percent = 100; defaultStatus = "Loaded " + currCount + " out of " + imgLen + " images [" + percent + "%]."; pending--; checkLoad(); return; } eval("document.all.cell" + (h+1) + ".style.backgroundColor = hilite[h]");; h++; setTimeout("changeto()",1); } defaultStatus = "Loaded 0 out of " + imgLen + " images [0%]." // end hiding --> </script> <br><br><br><br><br><br><br><br><br><br><br> <center> <b><font face="Verdana" size="1">preloading...<br><br> </font></b><br> <script language=JavaScript1.2> <!-- beging hiding document.write('<table border="0" cellpadding="0" cellspacing="0" width="' + preloadbarWidth + '"><tr height="' + preloadbarHeight + '" bgcolor="' + backgroundOfGradient + '">'); for (i = 0; i < num; i++) { document.write('<td width="' + gap + '" id="cell' + (i+1) + '"></td>'); } document.write('</tr></table>'); document.write('<p><small><a href="javascript:location.replace(locationAfterPreload)">skip</a></small></p></font>') loadImages(); // end hiding --> </script>

Kommentare

danielpt
danielpt am Samstag, 24. April 2004 um 11:50

bitte verlinke den Text extren, ich blick überhaupt nicht durch...

Ist ja das ganze Layout im A****... :(