# Set \_width of dynamic MovieClip

**URL:** https://forum.kirupa.com/t/set--width-of-dynamic-movieclip/226781
**Category:** flash
**Created:** [May 23, 2007, 11:21pm UTC](https://forum.kirupa.com/t/set--width-of-dynamic-movieclip/226781 "2007-05-23T23:21:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aDeviKreates](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@aDeviKreates](https://forum.kirupa.com/u/aDeviKreates)
#### Post date: [May 23, 2007, 11:21pm UTC](https://forum.kirupa.com/t/set--width-of-dynamic-movieclip/226781/1 "2007-05-23T23:21:04Z")

</div>

Greetings All!

I have a MovieClip on the Stage called special\_offer. I am using the following code to change the content of the special\_offer MovieClip (this is data from an XML file):

special\_offer.loadMovie(xmlData.current.url\_prefix.data+xmlData.current.special\_offer.data);

Now, what I want the movie clip to do is to resize itself based on the MovieClip above it called square as follows:

special\_offer.\_width = square.\_width;

My problem is this…

The actual size of the square MC is 238 (that’s what it says in the W property and when I trace it, that’s the value that’s returned). However, when I set the \_width value of the special\_offer MC to 238 either dynamically (pulling from the square) or manually, the size of the special\_offer MC is wider than the square MC…

Why?

The only way I can get the special\_offer width to match the size of the square MC is if I hard code in 204 as the .\_width.

Please help…

and

Thanks in advance!
