Preloader ???

Psyclic

Erfahrenes Mitglied
also mein scheiss preloader preloaded zwar aber nach dem preloaded bleib er einfach stehen und es geht nich weiter ! hir mal mein code :
Code:
<html>
<head>
<title>preload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<script language="JavaScript1.1">

<!-- begin hiding

// You may modify the following:
	var locationAfterPreload = "final.htm" // URL of the page after preload finishes
	var lengthOfPreloadBar = 230// Length of preload bar (in pixels)
	var heightOfPreloadBar = 5 // Height of preload bar (in pixels)
	// Put the URLs of images that you want to preload below (as many as you want)
	var yourImages = new Array("img/main_v4_final-1x5.gif","img/main_v4_final-2x2.gif","img/main_v4_final-2x3.gif","img/main_v4_final-2x4.gif","img/main_v4_final-2x5.gif","img/main_v4_final-3x2.gif","img/main_v4_final-3x3.gif","img/main_v4_final-3x4.gif","img/main_v4_final-3x5.gif","img/main_v4_final-3x6.gif","img/main_v4_final-4x2.gif","img/main_v4_final-4x3.gif","img/main_v4_final-4x4.gif","img/main_v4_final-4x5.gif","img/main_v4_final-5x2.gif","img/main_v4_final-5x4.gif","img/main_v4_final-5x5.gif","img/main_v4_final-6x2.gif","img/main_v4_final-6x3.gif","img/main_v4_final-6x4.gif","img/img/main_v4_final-6x5.gif","img/main_v4_final-7x2.gif","img/main_v4_final-7x3.gif","img/main_v4_final-7x4.gif","img/main_v4_final-7x5.gif")

// Do not modify anything beyond this point!
if (document.images) {
	var dots = new Array() 
	dots[0] = new Image(1,1)
	dots[0].src = "black.jpg" // default preloadbar color (note: You can substitute it with your image, but it has to be 1x1 size)
	dots[1] = new Image(1,1)
	dots[1].src = "blue.jpg" // color of bar as preloading progresses (same note as above)
	var preImages = new Array(),coverage = Math.floor(lengthOfPreloadBar/yourImages.length),currCount = 0
	var loaded = new Array(),i,covered,timerID
	var leftOverWidth = lengthOfPreloadBar%coverage
}
function loadImages() { 
	for (i = 0; i < yourImages.length; i++) { 
		preImages[i] = new Image()
		preImages[i].src = yourImages[i]
	}
	for (i = 0; i < preImages.length; i++) { 
		loaded[i] = false
	}
	checkLoad()
}
function checkLoad() {
	if (currCount == preImages.length) { 
		location.replace(locationAfterPreload)
		return
	}
	for (i = 0; i <= preImages.length; i++) {
		if (loaded[i] == false && preImages[i].complete) {
			loaded[i] = true
			eval("document.img" + currCount + ".src=dots[1].src")
			currCount++
		}
	}
	timerID = setTimeout("checkLoad()",10) 
}
// end hiding -->
</script>
<body bgcolor="#FFFFFF" text="#000000">
<script language="JavaScript1.1">
<!-- begin hiding
// It is recommended that you put a link to the target URL just in case if the visitor wants to skip preloading
// for some reason, or his browser doesn't support JavaScript image object.
if (document.images) {
	var preloadBar = ''
	for (i = 0; i < yourImages.length-1; i++) {
		preloadBar += '<img src="' + dots[0].src + '" width="' + coverage + '" height="' + heightOfPreloadBar + '" name="img' + i + '" align="absmiddle">'
	}
	preloadBar += '<img src="' + dots[0].src + '" width="' + (leftOverWidth+coverage) + '" height="' + heightOfPreloadBar + '" name="img' + (yourImages.length-1) + '" align="absmiddle">'
	document.write(preloadBar)
	loadImages()
}
document.write('<br><a href="javascript:window.location=locationAfterPreload">.please no. stop that.')
// end hiding -->
</script>


</html>
Bitte bitte helft mir !
 
@gouraud: natürlich kann man:




Code:
// You may modify the following:
	var locationAfterPreload = "redirect.htm" // URL of the page after preload finishes
	var lengthOfPreloadBar = 230// Length of preload bar (in pixels)
	var heightOfPreloadBar = 5 // Height of preload bar (in pixels)

.................

und eben den rest von dem code.....

in der redirect.htm steht das hier

Code:
<html>
<head>
</head>
<body onload="openIT()">
</body>
</html>

den befehl openIT() musste halt anpassen (is aber der standardbefehl fürs chromeless.......)

@psyclic: meistens is ein fehler in dem script, dass man ein bild falsch linkt.....hatte ich auch mal....hab ich erst nach 1000x drüberlesen gesehen (gif statt jpg)....das is ärgerlich :mad:
 

Neue Beiträge

Zurück