Closed Thread Icon

Preserved Topic: Fix for Image Cache Probs (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17721" title="Pages that link to Preserved Topic: Fix for Image Cache Probs (Page 1 of 1)" rel="nofollow" >Preserved Topic: Fix for Image Cache Probs <span class="small">(Page 1 of 1)</span>\

 
bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 04-14-2000 20:29

Hey all I've noticed a couple of posts about problems with IE 5 downloading an image even though it is preloaded. I was working on this for Pugzly and I noticed this. I have caching set to get a check for a new page everytime the page loads. What this setting does apparently is also turns off image caching. I set this to "Automatic" and my mouseovers were all good.<P>This is under TOOLS>>INTERNET OPTIONS>> and then the "Settings" for Temporary Internet Files. <P>Also while I'm at it heres a simple way to do mouseovers with preloaded images<P>First you need to create and array for all your image paths.

function preLoad(){
imgpath = new Array();
imgpath[0] = "http://www.bitdamaged.com/graphics/date_default.gif";
imgpath[1] = "http://www.bitdamaged.com/graphics/date_over.gif";
preloadImages(imgpath);
}

Then you need to create image objects for all of these.

function preloadImages(the_images) {
an_image = new Array();
for(i = 0; i < the_images.length; i++){
an_image[i] = new Image();
an_image[i].src = the_images[i];
}
}
I do it this way because that way if I add a new image I can just add the path to the first array and everything is automatic

Then you can use a simple function like this to swap your images
function swap(name, num) {
document[name].src = an_image[num].src;
}

Your links would look like this:
<a href="http://www.bitdamaged.com" onMouseover="swap('date','1');" onMouseout="swap('date','0');"><IMG SRC="http://www.bitdamaged.com/graphics/date_default.gif" NAME ="date" BORDER="0"></a><P>Hokay??<P>Walking the Earth like Kane

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 04-17-2000 18:56

This did wonders, Bitdamaged. I got my test site working at http://www.runningwolf.com/runningwolf4.com with an ORB interface I got from a photoshop site. I think I finally got this mouseover thing figured out.<P>Thanks for the help!<P>Pat Richard
Web weenie

Bruce
Bipolar (III) Inmate

From: Stafford, TX USA
Insane since: Mar 2000

posted posted 04-25-2000 07:49

Pugzly, before all your images loaded I moused over a few areas on the above mentioned web site and it gave me about four or five javascript errors in IE5. Once the images were all loaded the script errors stopped appearing...FWIW

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 05-08-2000 13:37

Anyone know of a way to get that to NOT happen? I don't like errors! <IMG SRC="http://www.ozones.com/forum/smile.gif"><P>------------------
Pat Richard
Web weenie

« BackwardsOnwards »

Show Forum Drop Down Menu