Forum Moderators: open

Message Too Old, No Replies

preloader in IE

         

doomtiger

9:54 am on Jul 27, 2005 (gmt 0)

10+ Year Member



Hi,

I have a little problem here with the preloader.swf.
It contains libs:array in which i have labels of swf files i need to load for the page but in IE i can't have it due to errors in refreshing the page. IE unfortunately takes those files from temporary internet files except from the server (which is normal) but when it can't load them it doesn't go to the server for those files it just hangs with a blank screen.
I need to load those files from the server and now i have done it by just excluding the array from the code but now the status bar in preloader is still and preloader is shown only for a second (time for animation in prelader but not for progrs bar move) and then i have a blank page untill the swf files are loaded.
The point is to have the status bar in preloader to work with the loading of those files again but without taking those files from temporary internet files.

Any help will be appreciated.

BlobFisk

9:38 am on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, doomtiger!

What sort of pathing are you using to fetch your files from the server? Absolute or relative?

doomtiger

5:49 am on Aug 2, 2005 (gmt 0)

10+ Year Member



relative , it's like first time the files are loaded from the server and then they are loaded from cache but the problem is that the developer who made this preloader used an array and just instance names for files to load into it and with such a resolution we had a problem with reloading the page under IE so i changed it to not instance names but full file names and excluded it from the array.
Now i have only problem with preloader to close after the files are loaded.

"delete this.onEnterFrame; this play ();"

this line is responsible for it but it doesnt work like it should , the code looks now like this :

//this is original code
/*var libs : Array = [ "mooble" , "intro" , "loadbox" , "lib_popup" , "lib_classes" , "lib_fonts" , "lib_main" , "lib_intro" , "lib_utilities" , "lib_components" ] ;*/

// this is a change that i made allready
this.createEmptyMovieClip ( "libholder" , 1 ) ;

// original code again
/*var __current : Number = 0 ;
var __incr : Number = 100 / libs.length ;*/

//another change made by me
var loader:MovieClipLoader = new MovieClipLoader();

var loadListener:Object = new Object();
loader.addListener(loadListener);
this.loader.loadMovie ( "mooble.swf" && "intro.swf" && "loadbox.swf" && "lib_popup.swf" && "lib_classes.swf" && "lib_fonts.swf" && "lib_main.swf" && "lib_intro.swf" && "lib_utilities.swf" && "lib_components.swf") ;

// an original code

//this.onEnterFrame = function ( ) {

//var bytes = this.libholder.getBytesTotal ( ) ;
//var loaded = this.libholder.getBytesLoaded ( ) ;
//var percent = Math.round ( ( loaded / bytes ) * 100 ) ;
//var scale = ( percent * __incr ) / 100 ;
//var preloadscale = ( __incr * __current ) ;
//if ( bytes > 4 ) preloadscale += scale ;
//this.loadbar._xscale = loadListener ;

// my changes

//if (loaded >= bytes && bytes > 0) {
//if (count>=12) {
//delete this.onEnterFrame ;
//this.play();
//stop();
//} else {
//count++;
//}
//} else {}

//original code
/*if ( bytes > 4 && bytes == loaded ) {
if ( __current!= libs.length - 1 ) {
__current ++ ;
this.libholder.loadMovie (libs[ __current ] + ".swf" ) ;
}
else {
delete this.onEnterFrame ;
this.play ( ) ;
}
}*/
//}

stop();

so if you have any ideas how to resolve this problem let me know