Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Page preload Script (works for everything but flash SWFs...)

    Hey there. I have finally found Preloading script that will hide the entire page for me until it is completely loaded. Unfortunately when I tried it out, it worked on everything BUT the flash part of the page. The SWF still shines right through it. An example of this is located here: http://vent.ddrbase.com

    I grabbed a script off of javascript source and just to test it out, I tried plugging in the code for my page to see how it would work. This is the code:
    PHP Code:
    <!-- 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 ONEPaste 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!! [url]http://javascript.internet.com[/url] -->

    <!-- 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 --> 
    It works VERY nicely except for the flash coming through. Are there any suggestions for this?
    TIA!
    - Source

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Flash (or Swish, if SWF is built with it) have their own option of preloading, thus you must use those facilities while building the SWF file.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •