1 Reply Latest reply on Jul 1, 2010 8:38 AM by Laer2

    Preloading an HTML/Flash page on PREVIOUS page

    Laer2 Level 1

      I have a site where all the pages have a common SWF embedded at the top (Nav and banner), but the rest of the page is HTML.  Everything is working fine, but I'm finding the 'independence' between the HTML and Flash is making for some sloppy transitions from page to page.  I was expecting the SWF to be delayed, at least for the first page visit (...and I have a preload routine inside the swf to make it's delay and appearance a bit more visually pleasant), but was surprised to sometimes find the SWF appearing and playing while the HTML content was delayed (resulting in a SWF floating in black).

       

      What I'm wondering is if there's a way I can do some sort of preload on my index page.... BUT, not the standard one that I'm sure everyone would suggest (...like the javascript image 'preload', or the newer 'css visibility' preload trick).  The problem with the standard one is that it doesn't check to see if everything is loaded.  What I'm after is a routine on my index page that invisibly loads some of the elements from my inner pages (common swf, maybe some of the images) and WAITS until it's done before moving to the inner pages (...displaying the company logo and/or a load status in the meantime).

       

      Many people would suggest a preloader inside the common SWF on my inner pages (which I have), but the problem with that on its own is that it doesn't stop the HTML from displaying.

       

      I'm trying to figure out a way to do a preloader (like those in a SWF, which loops until everything is loaded) that controls both the SWF AND the HTML.

       

      Every potential solution I think up has an issue.

       

      Recently, I found that you can use one swf to preload another, which would be a potential solution, as I could make an SWF on the index page whose sole purpose is to load (invisibly) the common SWF, displaying the load status and then loading an inner html page once it's done.

       

      Problem is, I have bee having trouble finding the coding for that, as most searches for preloaders end up being about standard preloaders, where it's monitoring the same SWF that the code is on, as opposed to controlling a second, external SWF.

       

      Can someone point me to or provide me with the proper coding/procedure for a preloader that controlls a second external swf.... or give me a better solution?

       

      It's a shame there's seemingly no way to 'lock' the SWF and HTML elements of a site together, so they load as one, and don't display/play independently....  or maybe there is.  Anyone?

        • 1. Re: Preloading an HTML/Flash page on PREVIOUS page
          Laer2 Level 1

          [On topic, but non-flash question]: If I put some graphics from the inner pages on my index page, but set the size to 1 (height and width), does that effectively preload those images into the cache (assuming the visitor stays on that page long enough for them to load), or do you need to have the image sizes set to that of the actual image size (and not 1)?

           

          Then again, the problem with putting invisible graphics on the index page is that it causes the index page to delay until it's displayed... so, you'd be staring at a blank browser page for a while (with no indication of progress).  You'd almost need an initial page (that loads up immediately), then have that end with a 'Loading' graphic, then load the preload page (page with hidden graphics), which wouldn't display until everything is loaded (so you'd be looking at the Loading from the first screen, which would still be there because the second HTML page woudn't have all the graphics loaded yet... and then you'd need a button or something so that once that loads, you could move to the next page....  Ew....  I'm sure there's some far better javascript type method.  This is just an 'automatic' code-free theory....  but ugly as hell, though.