# Getting width/height of an external img loaded into emptyMC

**URL:** <https://forum.kirupa.com/t/getting-width-height-of-an-external-img-loaded-into-emptymc/72441>\
**Category:** flash\
**Created:** [December 6, 2004, 2:17am UTC](https://forum.kirupa.com/t/getting-width-height-of-an-external-img-loaded-into-emptymc/72441 "2004-12-06T02:17:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evilryu](https://avatars.discourse-cdn.com/v4/letter/e/e56c9b/32.png) [@evilryu](https://forum.kirupa.com/u/evilryu)\
**Post date:** [December 6, 2004, 2:17am UTC](https://forum.kirupa.com/t/getting-width-height-of-an-external-img-loaded-into-emptymc/72441/1 "2004-12-06T02:17:27Z")

</div>

Hi All,

I’ve been searching all over the net and I still can’t find the anwser. So I hope you guys here could give me a few pointers.

I am trying to get \_width and \_height of a dynamically created emptyMovieClip that contains a .jpg image. Here is the code:

## \_root.createEmptyMovieClip(“imgHolder”, 1); \_root.imgHolder.loadMovie(image); trace("image width = " + \_root.imgHolder.\_width ); trace("image height = " + \_root.imgHolder.\_height );

The problem is that my traces return 0 for width and 0 for height (I’m assuming its the emptymovieclip’s dimension but it should have increased its size based on loading that jpg)

Is there anyway to dynamically retrieve the dimensions of an external image?

Thanks!

Evil
