title: AS3 Preloader not working in browser, but does in Flash Professional
body: <p>I've got a SWF to which I added a Preloader scene. The preloader works fine when I hit Ctrl+Enter in Flash CS4, and select View > Simulate Download.</p>
  
  <p>The preloader displays, and when full, the movie continues as expected.</p>
  
  <p>However, the moment I embed the SWF into some HTML, and load from localhost in any browser, the movie doesn't continue until I right click and select Play.</p>
  
  <p>When I use the Charles Web Debugging Proxy tool and throttle the connection, then again preloading works fine, and the movie proceeds when done?</p>
  
  <p>Any idea what might be going wrong? Here's the source for the preloader:</p>
  
  <pre><code>import flash.events.ProgressEvent;
  
  loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);
  
  function update(e:ProgressEvent):void
  {
      var percent:Number = Math.floor((e.bytesLoaded * 100) / e.bytesTotal);
  
      if(preloaderClip is MovieClip)
      {
          preloaderClip.gotoAndStop(percent);
      }
  
      if(percent == 100)
      {
          play();
      }
  }
  
  // Extra test for IE
  var percent:Number = 
      Math.floor((this.loaderInfo.bytesLoaded * 100) / this.loaderInfo.bytesTotal);
  
  if(percent == 100)
  {
      nextFrame();
  }
  stop();
  </code></pre>