Closed Thread Icon

Topic awaiting preservation: JS Preload Script (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8282" title="Pages that link to Topic awaiting preservation: JS Preload Script (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: JS Preload Script <span class="small">(Page 1 of 1)</span>\

 
wedge
Nervous Wreck (II) Inmate

From:
Insane since: Aug 2002

posted posted 08-27-2002 12:16

I am interested in obtaining the script that displays a loading message while the page loads. I see this script used throughout ozones.com and also on the grym design site. I am not yet skilled enough in JS to pull the necessary code out of the pages I mentioned. I was not able to find this in the tutorials section either. Any assistance would be greatly appreciated.

Regards,

Wedge

pwhitrow
Bipolar (III) Inmate

From: UK
Insane since: Feb 2002

posted posted 08-27-2002 13:14

If you go to my website, you'll find a preloader script the the Misc section of the Scripts menu. Have a look and see if is of use to you.

Regards

Paul

www.pwhitrow.com

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 08-27-2002 23:07

http://www.dynamicdrive.com/dynamicindex4/preloadimage.htm
http://www.dynamicdrive.com/dynamicindex4/preloadimage2.htm



wedge
Nervous Wreck (II) Inmate

From:
Insane since: Aug 2002

posted posted 08-28-2002 21:33

thanks very much for your help! I will definately find these useful. Do you know if they will preload pages with flash content on them?


kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 08-28-2002 21:38

wedge: No, they probably won't, because images and flash movies are two completely different kinds of objects.

Have a look at this tutorial at the GurusNetwork and see if it is what you are looking for:
http://www.gurusnetwork.com/tutorials/flash/basicpreloader.html

kuckus (cell #282)

wedge
Nervous Wreck (II) Inmate

From:
Insane since: Aug 2002

posted posted 08-29-2002 02:31

kuckus: thanks for the link. This is not what I am looking for however. I am able to create flash preloaders. What I am doing is trying to preload a page with mixed content and have it all appear at the same time. Right now I have a great preload script that is embedded into the page being pre-loaded, but the flash navigation peeks through. I am wondering if I can "hide" the flash navigation until the html elements load. If all else fails I will put a preloader in the flash navigation that is the same color as the html background and see if I can coordinate the timing using the FS Command in actionscript.

here is the script that I found at javascript.internet.com if anyone wants to play around with it.


<!-- THREE STEPS TO INSTALL PRELOAD PAGE:

1. Copy the coding into the HEAD of your HTML document
2. Add the onLoad event handler into the BODY tag
3. Put the last coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Gilbert Davis -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function loadImages() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
document.hidepage.visibility = 'hidden';
}
else { // IE 4
document.all.hidepage.style.visibility = 'hidden';
}
}
}
// End -->
</script>
</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->

<BODY OnLoad="loadImages()">

<!-- STEP THREE: Copy this code into the BODY of your HTML document -->

<div id="hidepage" style="position: absolute; left:5px; top:5px; background-color: #FFFFCC; layer-background-color: #FFFFCC; height: 100%; width: 100%;">

<table width=100%><tr><td>Page loading ... Please wait.</td></tr></table></div>

<!-- put the rest of your page contents here -->

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.20 KB -->



[This message has been edited by wedge (edited 08-29-2002).]

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 08-29-2002 07:58

Ah OK, I see. That should be doable.

First, you'll have to put a <div> with an ID like "hideflash" around the flash navigation and set its visibility to "hidden":

<div id="hideflash" style="visibility: hidden;"> [code for flash navigation here] </div>

Then, within the loadImages() function, you'll need to add a line that switches its visibility back to "visible" in all the places where the other <div> is being hidden:

document.getElementById('hideflash').style.visibility = 'visible';

document.hideflash.visibility = 'visible';

document.all.hideflash.style.visibility = 'visible';

And that should do the trick.


kuckus (cell #282)

wedge
Nervous Wreck (II) Inmate

From:
Insane since: Aug 2002

posted posted 08-29-2002 20:00

Thanks again kuckus. I owe you big time. That did the trick. This is an awesome script. I plan to use it a lot.

Thanks to everyone that responded to my question. much appreciated.

Regards,

Wedge



[This message has been edited by wedge (edited 08-29-2002).]

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 09-03-2002 23:06

The preloading question has come up an awful lot so I've prepared a FAQ (not much yet but its worth seeing if your question has been answered before):
http://faq.ozoneasylum.com/753/

___________________
Emps

FAQs: Emperor

xerof
Obsessive-Compulsive (I) Inmate

From: San Diego, CA, USA
Insane since: Apr 2003

posted posted 04-05-2003 01:44

if you have a prelodaer script with progress bar, is it possible to make it so that the bar loads for 5 secconds regardless of if the preloader has already loaded all the images on the page?

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 04-05-2003 13:01

xerof: Welcome. Yes that is easy to do easier in fact than an ordinary preload script.

And damn I thought mr.maX had started posting again but it was a script from the depths (and I thought I'd archived all these when I made the FAQ).

___________________
Emps

FAQs: Emperor

« BackwardsOnwards »

Show Forum Drop Down Menu