Tech Support banner

Status
Not open for further replies.
1 - 2 of 2 Posts

·
Registered
Joined
·
81 Posts
Discussion Starter #1
I'm cought with a delema. I need to preload an HTML page before any of it displays. Preferably, I'd like to take users to a splash screen, that completely loads the images and text on the following page. But here's where it gets tricky- the website contains some flash elements as well, which have thier own preloaders. So I don't want the flash elements to be preloaded, only images and text; so that when the users arive at the page, all the images appear in sync and the flash preloaders get to do their job.

Does anyone know of a way to do this?
 

·
Registered
Joined
·
5 Posts
This script may help you. Its a java script to pre load images. I pulled it from Dreamweaver as a behaviour:

<script language="JavaScript" type="text/JavaScript">
<!--
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.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
//-->
</script>

This code calls the image as a preloaded image:

<body>
<img src="/yourimagespace/yourimage.jpg" width="750" height="89" onload="MM_preloadImages('/yourimagespace/yourimage.jpg')">
</body>
</html>

If your using Dreamweaver you can select the image, goto behaviours, go down the menu to "pre-load images". Then find an image on your site using the file browser that pops up and your done. I think you might have to do that for each image as well but I'm unsure.

Good Luck

Ben
 
1 - 2 of 2 Posts
Status
Not open for further replies.
Top