# Automatic resizing of dynamic text boxes

**URL:** <https://forum.kirupa.com/t/automatic-resizing-of-dynamic-text-boxes/131892>\
**Category:** Uncategorized\
**Created:** [December 21, 2004, 12:41am UTC](https://forum.kirupa.com/t/automatic-resizing-of-dynamic-text-boxes/131892 "2004-12-21T00:41:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_S](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@J\_S](https://forum.kirupa.com/u/J_S)\
**Post date:** [December 21, 2004, 12:41am UTC](https://forum.kirupa.com/t/automatic-resizing-of-dynamic-text-boxes/131892/1 "2004-12-21T00:41:30Z")

</div>

i have a page of image thumbnails in my Flash movie which have been created dynamically from an XML file. Each image has a small line of related text, a caption, to go with the image. When the user rolls over the image, the mouse cursor is hidden and replaced with the image caption for that image using this code:

attachMovie(“follow”, “follow”, this.getNextHighestDepth());  
startDrag("/follow", true);  
Mouse.hide();  
\_root.follow.followcaption.text = myXML.childNodes[imgGal].childNodes[this.var2].attributes.desc;

the caption text changes dynamically depending on which thumbnail the cursor is over. my problem is this: how do i make the dynamic text box size resize in length automatically depending upon how long my line of dynamic text is? it needs to change because the text box has a white background to it, so needs to become shorter or longer with the text length.

thanks in advance

joe smalley
