# MX - Dynamic Text Box Positioning

**URL:** <https://forum.kirupa.com/t/mx-dynamic-text-box-positioning/287>\
**Category:** flash\
**Created:** [July 12, 2002, 10:46am UTC](https://forum.kirupa.com/t/mx-dynamic-text-box-positioning/287 "2002-07-12T10:46:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![entropy](https://avatars.discourse-cdn.com/v4/letter/e/5f9b8f/32.png) [@entropy](https://forum.kirupa.com/u/entropy)\
**Post date:** [July 12, 2002, 10:46am UTC](https://forum.kirupa.com/t/mx-dynamic-text-box-positioning/287/1 "2002-07-12T10:46:36Z")

</div>

Hi,  
I have 2 dynamic text fields instance names textField1 & 2, drawing their content from a text file containing 2 variables (text). Both text fields are set to autosize, so they change in width according to the amount of characters in the variable.  
I also have the following code to position text field 2 to the right of text field 1

textField1.autosize=true;  
textField2.autosize=true;  
textField2.\_x = textField1.\_x + textField1.\_width + 10;  
textField2.\_y = textField1.\_y;

When the textfield is static, it works fine. However, using dynamic text seems to be a problem and the right field just displays 5 pixels from the left x position of text field 1… I think the problem is the way i’ve set up the script - it doesn’t appear to recognise the width of textfield 1 as set by the autosize command.  
If anyone can help I’d be very much obliged.

Cheers
