2 Replies Latest reply on Jul 2, 2010 2:44 PM by Laer2

    Making a swf wait until the rest of the HTML page is ready?

    Laer2 Level 1

      I have a site with a common SWF embedded at the top of each page, and then regurlar graphic/text HTML content below it.


      I was anticipating that the SWF might have a bit of a delay for it to load, and that the rest of the page would be appearing pretty much right away... and that DOES happen from time to time.


      However, the one thing I wasn't expecting, and don't quite understand, is that sometimes the SWF will appear first and even start playing, yet the rest of the page doesn't appear for a second or two, so I end up with this SWF movie floating in black.


      Not entirely sure what is holding the page back, since most of the graphics are shared/common on each page.  There are some embedded videos (with poster frames, so they shouldn't take too long to load) on some pages, which are probably the culprits.


      What I don't get (besides how to further optimize the pages), is why the SWF appears and plays, if it is an element within the table that contains all the content of the page.  I thought that tables only display once EVERYTHING in it is loaded... So, why would the SWF appear before the other elements are ready?  I'm assuming the other (non-common) elements are not finished downloading... although I'm starting to suspect that maybe they are, and the delay is something else... like the embedded QT's 'initializing' or something?


      Anyway, I don't imagine there is a solution here, but I'll ask....  Is there some way to have the SWF wait for the rest of the page to finish doing whatever it is that it's doing that is causing the delay?


      Weird thing is, it's kind of random...  Sometimes it loads instantly... other times, either the SWF is floating on black for a second or two... or the rest of the page shows up, and it's the SWF that's late.


      Anyone have any advice, words of wisdom, or bits of trivia that might be of use here?

        • 1. Re: Making a swf wait until the rest of the HTML page is ready?
          Ned Murphy Adobe Community Professional & MVP

          As far as I know, you can't really control how an html page loads up.   Some things find a faster route than others.  Requests go to the server and things get delivered by whichever routes they can.  Some things are taken from the local cache as well, so there's always a likelihood that some items are readily available despite their size, and other tiny things get caught up in travel.

          • 2. Re: Making a swf wait until the rest of the HTML page is ready?
            Laer2 Level 1

            Yep, ain't that the truth....


            Along with the randomness of the HTML elements in general, the relationship between the Flash and HTML are similarly 'independent'.


            I was just wondering if there were some little tricks or methods used by web guys these days, as it seems like clever new techniques or new capabilities in CSS or Flash pop up from time to time.


            Very odd, though...  The interface graphics are very light, yet sometimes the page takes a few seconds to show, and the Flash appears right away (the opposite of what I'd normally expect, when things 'go wrong').


            I still don't get why the SWF shows up (when the rest of the table doesn't), if the rule is true that a table won't show up unless all the content is available.


            Is there some sort of weird exception if the content of a cell is Flash?