title: gotoAndPlay frames based on the percentage of an AS3 preloader's progress
body: <p>i followed <a href="http://www.gotoandlearn.com/play?id=85" rel="nofollow noreferrer">this</a> excellent as3 preloader tutorial, and below is the code i have so far.</p>
  
  <pre><code>var l:Loader = new Loader();
  l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
  l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
  l.load(new URLRequest("content.swf"));
  
  function loop(e:ProgressEvent):void
  {
  var perc:Number = e.bytesLoaded / e.bytesTotal;
  percent.text = Math.ceil(perc*100).toString();
  trace("loading...");
  }
  
  function done(e:Event):void
  {
  removeChildAt(0);
  percent = null;
  addChild(l);
  trace("done!");
  }
  </code></pre>
  
  <p>this loads the main content perfectly. displaying the percent of the loading progress. </p>
  
  <p>now i'd like to take it a step farther. my goal is to have 3 images in 3 different frames on a timeline and have one become visible on 25% done, the second on 50% done, and the final image on 75% done. </p>
  
  <p>i'm assuming i need to add some if statements but i'm having trouble figuring out what the syntax would be to listen for the percentage for flash to know what frame to move to.</p>
  
  <p>thanks for reading and any help is greatly appreciated. </p>