# textWidth needed - but not as an integer

**URL:** https://forum.kirupa.com/t/textwidth-needed-but-not-as-an-integer/268246
**Category:** flash
**Created:** [August 11, 2008, 8:43pm UTC](https://forum.kirupa.com/t/textwidth-needed-but-not-as-an-integer/268246 "2008-08-11T20:43:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)
#### Post date: [August 11, 2008, 8:43pm UTC](https://forum.kirupa.com/t/textwidth-needed-but-not-as-an-integer/268246/1 "2008-08-11T20:43:34Z")

</div>

I’m using (textfield.\_width-4)-textfield.textWidth to calculate an offset variable. I then divide that by 2 to get a number to add to the \_x position of letter movie clips, so as to centre them.

Problem being, this is slightly off since textWidth returns integers only…Is there a way i can get true floating point values for textWidth?
