# Text box resize

**URL:** <https://forum.kirupa.com/t/text-box-resize/243940>\
**Category:** Uncategorized\
**Created:** [November 12, 2007, 7:55pm UTC](https://forum.kirupa.com/t/text-box-resize/243940 "2007-11-12T19:55:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![punstc](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@punstc](https://forum.kirupa.com/u/punstc)\
**Post date:** [November 12, 2007, 7:55pm UTC](https://forum.kirupa.com/t/text-box-resize/243940/1 "2007-11-12T19:55:47Z")

</div>

alright this might be an easy answer but for some reason i can’t get it to work.

i have a text box that i want to set its width to the size of the stage width and the height 30 pixels less. and have it resize when i resize the movieclip.

here the code i’m using

```auto

Stage.scaleMode = "noScale";

//position content
var HPositioner:Number = (Math.round((Stage.width - 640) / 2));
var VPositioner:Number = (Math.round((Stage.height - 480) / 2));

function HPosition () {
           var HPositioner:Number = (Math.round((Stage.width - 640) /2));

		   setProperty(updateText, _width, Stage.width);
	
}

function VPosition () {
           var VPositioner:Number = (Math.round((Stage.height - 480) /2));

		   setProperty(updateText, _height, Stage.height - 30);
		  
}

HPosition();
VPosition();

```

i want the text to automatically fill out the new adjusted text box as well. am I doing this correctly with the code i have?
