Closed Thread Icon

Preserved Topic: Should have seen this one comming :( (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17995" title="Pages that link to Preserved Topic: Should have seen this one comming :( (Page 1 of 1)" rel="nofollow" >Preserved Topic: Should have seen this one comming :( <span class="small">(Page 1 of 1)</span>\

 
Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 06-29-2001 06:15

Crap! I spend all this time writing a psudo image pre-loading script to to realise that it's gonna fail if the images are already loaded.

What i did was use an onLoad() event trigger in each <IMG> tags to flag/increas a var. I also had a loop (if statment with a setTimeout, but hey, it worked...) checking the var to see if had reached a certain number, if so then the loading was complete.

Well, this did work, and it worked will for being souc a simple srcipt but... When you re-visit the page and the images are already in your cache then the 'get' method isn't used for each image again therefore the onLoad() event isn't triggered. blurg!

However, the script will work if you refresh/reload the page as all of the requests for the <IMG> tag's are sent again therefore the event triggers are triggered again...

So, anyone know any good and indepth tutes about writing those image preloading scripts, you know, the ones with the little progress bar...???

Or, any other help you could provide woyld be great.

Oh, and is this supported by IE5 & NS6/Moz : document.images.item(2).complete ??? as I should be able to get what I want from that but if it doesn;t work I don;t want to find out after spending several hours codeing.

Oh, if you want to see my ever so dogey srcipt in action check out http://flux.clanman.com rember it will work the first time round but shouldn't get past the loading page on the second time through.......

Thanks all in advance

everybody needs a swamp bear

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-29-2001 08:11



« BackwardsOnwards »

Show Forum Drop Down Menu