# How do I get the width of an image create by loadMovie?

**URL:** <https://forum.kirupa.com/t/how-do-i-get-the-width-of-an-image-create-by-loadmovie/190373>\
**Category:** flash\
**Created:** [June 11, 2006, 4:52am UTC](https://forum.kirupa.com/t/how-do-i-get-the-width-of-an-image-create-by-loadmovie/190373 "2006-06-11T04:52:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![russellarmand](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@russellarmand](https://forum.kirupa.com/u/russellarmand)\
**Post date:** [June 11, 2006, 4:52am UTC](https://forum.kirupa.com/t/how-do-i-get-the-width-of-an-image-create-by-loadmovie/190373/1 "2006-06-11T04:52:46Z")

</div>

I’m creating an empty clip “image\_mc” and loading an image into it via XML. The image is appearing fine, and the alpha is working too. But when I try to trace the width of image\_mc, it keeps returning “0” – and what I’m really after is the width of that image I’m loading!

Code looks like this:

```auto
newItem.picture_mc.createEmptyMovieClip("image_mc", 4);
newItem.picture_mc.image_mc.loadMovie(allData*.firstChild.firstChild);
newItem.picture_mc.image_mc._alpha = 50;
trace(newItem.picture_mc.image_mc._width);

```

Anyone know how to get the width of the image that’s being loaded?

:pirate:
