title: How to check if an SWF file loaded (ActionScript)
body: <p>How do I check if an <a href="http://en.wikipedia.org/wiki/SWF" rel="nofollow">SWF</a> file loaded?</p>
  
  <p>I want to execute a script when an SWF file has finished loading,</p>
  
  <pre><code>root.addEventListener(Event.COMPLETE, onComplete);
  root.addEventListener(ProgressEvent.PROGRESS, onProgress);
  
  function onProgress(e:ProgressEvent):void
  {
      trace("onProgress");
  }
  
  function onComplete(e:Event):void
  {
      trace("onComplete");
  }
  </code></pre>