# MovieClip width and height stuck at zero

**URL:** <https://forum.kirupa.com/t/movieclip-width-and-height-stuck-at-zero/254506>\
**Category:** Uncategorized\
**Created:** [March 12, 2008, 7:36pm UTC](https://forum.kirupa.com/t/movieclip-width-and-height-stuck-at-zero/254506 "2008-03-12T19:36:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrZoop](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@DrZoop](https://forum.kirupa.com/u/DrZoop)\
**Post date:** [March 12, 2008, 7:36pm UTC](https://forum.kirupa.com/t/movieclip-width-and-height-stuck-at-zero/254506/1 "2008-03-12T19:36:57Z")

</div>

Greetings:

In ActionScript 3.0, I use Senocular’s duplicateDisplayObject ([http://www.senocular.com/flash/actionscript.php?file=ActionScript\_3.0/com/senocular/display/duplicateDisplayObject.as](http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/display/duplicateDisplayObject.as)) to duplicate a MovieClip, but after that point the width or height of the MovieClip is locked at zero. I tried playing with the scaleX and scaleY values, but the moment I try to set the size, the width, height, scaleX, and scaleY properties are all reset to zero.

I find it difficult to hold back my severe… disagreements… with ActionScript. I have been coding ActionScript for a while and programming overall for 14+ years, but it never ceases to amaze me the random quirks it throws me.

EDIT:

Well, I found a way to create a new instance of a MovieClip by making a Linkage in the Library and then using the following:

```auto

  public function SetMovieClip(value:Class):void
  {
   //...not applicable code here...  
 
   // create duplicate
   myCurrentMovieClip = new value();
   myStage.addChild(myCurrentMovieClip);
   AlignRectangleAndMovieClip();
  }

```

Where value is the name of the Linkage.

I find it very disconcerning to use a class… called Class though… that represents any class… that’s just… wrong or something.
