title: AS3 preloading external swf won't reach 100%
body: <p>I have a flash interface file and I'm trying to load external swfs with a preloader. My problem is that the preloader never reaches 100% before trying to play the swf.  The preloader will display, count up to a percentage and disappear. Then the swf just hangs for a few seconds on the first frame(some times over 10 seconds!) while it finishes loading.  It does eventually start playing.  The percentage the loader reaches is completely random.  It might reach 40% one time and only 7% the next.  </p>
  
  <p>I'm loading the external swfs into an empty movieClip on stage called "visloader".</p>
  
  <p>Here is my loader code:</p>
  
  <pre><code>loader= new SWFLoader("nameOfSlide.swf", {container:visloader, autoPlay:false, onProgress:progressHandler, onComplete:completeHandler});
  
  loader.load();
  </code></pre>
  
  <p>And here are my progress and complete functions:</p>
  
  <pre><code>//--------------PROGRESS HANDLER----------------------------------------------------------------
  function progressHandler(e:Event):void{
      //set alpha of loading animation to 1 so it is visible
      progClip.alpha = 1;
      progClip.loadPct.text = "" + Math.floor((loader.bytesLoaded/loader.bytesTotal)*100) + "%";
  }
  
  //--------------COMPLETE HANDLER-----------------------------------------------------------------
  
  function completeHandler(e:Event):void{
      //hide the preloader animation
      progClip.alpha = 0;
      //myClip was created in the variables section above to hold the loaded swf
      //must use 'rawContent' to get control over the swf (play/pause, etc...)
      myClip = e.target.rawContent;       
  
      myClip.play();
  }
  </code></pre>
  
  <p>"progClip" is a movieClip on stage with a spinning circle and a text field called "loadPct".</p>
  
  <p>The external swfs being loaded are pretty large.  Some over 5 MB.  Not sure if that matters.  I've used the exact same preloader for a different client with slightly smaller files and had no issues. I'm at a complete loss.</p>
  
  <p>I don't think this has been asked before.  I searched the forums and came up with nothing.  Hopefully someone here will know what I'm talking about.</p>
  
  <p>Thanks in advance!</p>