# Width doesn't work

**URL:** <https://forum.kirupa.com/t/width-doesnt-work/308367>\
**Category:** flash\
**Created:** [April 21, 2010, 5:25pm UTC](https://forum.kirupa.com/t/width-doesnt-work/308367 "2010-04-21T17:25:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curb\_Crowser](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@Curb\_Crowser](https://forum.kirupa.com/u/Curb_Crowser)\
**Post date:** [April 21, 2010, 5:25pm UTC](https://forum.kirupa.com/t/width-doesnt-work/308367/1 "2010-04-21T17:25:18Z")

</div>

I have a button object that I need to scale to align with the variable width of an array of images.

However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen… it’s off.

I’ve proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.

![](http://forum.kirupa.com/uploads/kirupa/6208/61cbabe66ae21193.png)

```auto

navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410

```

Ever seen anything like this?
