I have loaded an image at runtime into a movieclip
(holder_mc) nested within another movieclip (image_mc) placed onto
the stage. So I want to center the newly loaded image into the
movieclip, because I load different images with diferrent sizes. So
if the image is smaller than the movieclip I want it to be on the
center of the movieclip.
> AFTER loading is complete (ie, use preloader code or the
onLoadInit() method of
> the moviecliploader class), you can use:
The original poster didn't mention if they were using
loadMovie(). I thought it worth mentioning that you need to
MovieClipLoader class because the onLoadInit() event handler
available if you are using the loadMovie() method.
I would also Math.round() your values so the image lines up
pixels so there is no bitmap distortion.