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:
imageLoader = new Loader();
imageLoader.load(new URLRequest(event.target.name));
screenBox.screenHolder.addChild(imageLoader);
trace(this.imageLoader.width);
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?