var time = 3; var maxtime = 120; /* PAs touche */ var done = 1; time = time * 1000; maxtime = maxtime * 1000; loaded = new Array(); function Pre_load() { for( index = 0; index < document.images.length; index++ ) { loaded[ index ] = false; } } window.setTimeout( "document.getElementById('Loading_Img').style.visibility='hidden';", maxtime ); function Preload_Img() { imgs = document.images; for( index = 0; index < imgs.length; index++ ) { if( done >= imgs.length ) { break; } else if( imgs[ index ].complete && loaded[ index ] == false ) { done++; loaded[ index ] = true; } } if( done >= imgs.length ) { window.setTimeout( "document.getElementById('Loading_Img').style.visibility='hidden';", time ); } else { window.setTimeout( "Preload_Img()", '58' ); } if( done == imgs.length ) { window.setTimeout( "window.location.href='intro.html';", time); } PRC = Math.round( ( ( done / imgs.length ) * 100 ) ); barwidth = PRC * 2.13 ; preview = '' +' '+' ' + ' '+ PRC + ' ' + '%' document.getElementById('Loading_Img').innerHTML = preview; } Pre_load(); Preload_Img();
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question