# Can't get dimensions of EmptyMC

**URL:** <https://forum.kirupa.com/t/cant-get-dimensions-of-emptymc/169757>\
**Category:** flash\
**Created:** [November 19, 2005, 1:49am UTC](https://forum.kirupa.com/t/cant-get-dimensions-of-emptymc/169757 "2005-11-19T01:49:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sinister\_Shadow](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Sinister\_Shadow](https://forum.kirupa.com/u/Sinister_Shadow)\
**Post date:** [November 19, 2005, 1:49am UTC](https://forum.kirupa.com/t/cant-get-dimensions-of-emptymc/169757/1 "2005-11-19T01:49:36Z")

</div>

Ok, I’ve created an empty movieclip in \_root and loaded an image into it but whenever I do trace(\_root.newMC.\_width) I get a 0! I’ve had this problem in the past but never really looked into it!

Ah, while I’m at it, I have the following code:

```auto
with _root
  {
   createEmptyMovieClip("file", 0).loadMovie("someimg.jpg");
   ["file"]._x = (Stage.width - ["file"]._width) / 2;
   ["file"]._y = (Stage.height - ["file"]._height) / 2;
   lineStyle(3, 000000, 100);
   moveTo(0, 0);
   lineTo(800, 600);
   moveTo(0, 600);
   lineTo(800, 0);
  }

```

The problem I’m having with this is that when it looks for Stage.width it’s actually trying to find \_root.Stage.width. How do I get around that without breaking out of the ‘with’?
