title: Flash AS3: How do you calculate the width of an image loaded into a movieclip?
body: <p>I am loading an image into a movie clip via AS3, and what I want to do is center the image inside the movieclip. The problem is that I can't seem to grab the width value of the image being loaded. Below is what I'm doing:</p>
  
  <pre><code>imageLoader = new Loader();
  imageLoader.load(new URLRequest(event.target.name));
  screenBox.screenHolder.addChild(imageLoader);
  trace(this.imageLoader.width);
  </code></pre>
  
  <p>When I trace the width, it always comes back at zero(0) even though there is an image inside the imageLoader. What is it I need to do to find the actual width so I can center the image?</p>