# Adding an operator "-" dilema

**URL:** <https://forum.kirupa.com/t/adding-an-operator-dilema/252964>\
**Category:** Uncategorized\
**Created:** [February 25, 2008, 10:11pm UTC](https://forum.kirupa.com/t/adding-an-operator-dilema/252964 "2008-02-25T22:11:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lruiz](https://avatars.discourse-cdn.com/v4/letter/l/3ab097/32.png) [@lruiz](https://forum.kirupa.com/u/lruiz)\
**Post date:** [February 25, 2008, 10:11pm UTC](https://forum.kirupa.com/t/adding-an-operator-dilema/252964/1 "2008-02-25T22:11:33Z")

</div>

Been trying to figure out how to modify these line 4&5:

```
        // x postion mainBtn
        mainBtn._x += mainMenu["mainBtn"+(i-1)]._x+mainMenu["mainBtn"+(i-1)].btnName.t.textWidth+mainSpacing;
        // scale over and normal backgrounds to fit length of text
        mainBtn.bg._width = mainBtn.btnName.t.textWidth+mainSpacing;
        mainBtn.overMc._width = mainBtn.btnName.t.textWidth+mainSpacing;
        // center text in middle of button
        mainBtn.btnName._x = mainBtn.bg._width/2-mainBtn.btnName.t.textWidth/2;

```

Been trying to write/add on a rule subtracting pixels from the width size of the button movie clip (mainBtn.bg). Hence which is automatically create/made up from the length of the width size of the button. The buttons are dynamic from XMl doc. Purpose is I’m trying to shave down a 20 pixels of the automated width.

Can anyone help?

:tired::hurt:;(
