koorb
11-19-2003, 08:10 PM
I am trying to protect and preload images for a site i am doing for a client
www.thechilli.co.uk/clients/art_gecko
I am pulling images from a protected directory using a php script simply with a readfile() function and this works, I am using Macromedias - MM_preloadImages() function,
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
But everytime I load the page it seems to reload the images as if they are all new. so its worse than not `preloading`!
Little help?
TIA
www.thechilli.co.uk/clients/art_gecko
I am pulling images from a protected directory using a php script simply with a readfile() function and this works, I am using Macromedias - MM_preloadImages() function,
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
But everytime I load the page it seems to reload the images as if they are all new. so its worse than not `preloading`!
Little help?
TIA
