0 Replies Latest reply on May 24, 2006 2:37 PM by eirkeirkeirk

    advanced preloading problem

    Level 1
      hopefully i can explain this clearly!

      what i'm trying to do is track the loading progress of "movie.swf" as it loads into "master.swf". movie.swf is a photo gallery, holding a bunch of externally loaded JPEGs. i'm using an XML sheet to determine which JPEGs are loaded into movie.swf.

      i'm loading movie.swf INTO master.swf. master.swf will be where the loading progress will be displayed.

      all of this is fine and it works. my first attempt caused a problem because the variable that's tracking the grand total number of bytes of ALL the JPEGs kept growing as the images were loaded. the fact that the JPEGs load asynchronously (sp?) is causing the loading bar to jump around. it will work fine, but as the bar grows, *BAM*, the SWF connects to and starts downloading another JPEG. because of this, the grand total number of bytes has grown so the "percent loaded" becomes a smaller number and the loader bar shrinks back a bit. the bar continues to grow and then *BAM* another JPEG starts downloading, the bar shrinks again, and then *BAM* yet another JPEG starts to load and the bar shrinks down. eventually all the images have begun loading and then the bar works fine the rest of the way.

      to fix this, i decided to not show loading progress untill ALL of the remote JPEGs have at least BEGUN downloading. the problem with this is by the time all of the remote JPEGs have begun download, all of the JPEGs are close to being completely downloaded! so now the problem is the progress bar shows nothing (even though JPEGs are being downloaded) and then it just jumps to 80% and continues to grow like it should until the images are all downloaded completely.

      is there a way around this? is this just the way it is?

      ideally, i'd like it to start downloading image1, then immediately start downloading image2, then immediately start downloading image3, etc. that way, i can quickly get an accurate grand total number of bytes that need to be loaded. can this be down somehow?

      thanks so much for bearing with me!


      p.s. here is a sample of what i've got so you can see how the loader bar jumps: http://hansen-photo.com/loadtest/

      and for good measure, this is the version that grows, then shrinks, then grows, then shrinks... http://hansen-photo.com/loadtest/index2.htm