• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

Resizing dynamic text fields

I'm having a problem with the size of my dynamic text fields.  I am creating a bunch of movie clips using duplicateMovieClip.  Each MC contains a dynamic text field.  The problem is that some of the text fields have more text than others and sometimes it gets cut off.  I know that I can resize the text clip using the _width parameter, but I want to know if there is any way to make the text field adjust its size to the amount of text so that it is neither too big nor too small.  
0
lukathonic
Asked:
lukathonic
1 Solution
 
rexmorCommented:
Maybe you can use createTextField() in FlashMX you can set the width,height,depth... dynamically.

Hope this helps

rex
0
 
henrywwCommented:
like rexmor said use createTextField()

root.createTextField("myText",1,100,100,0,0);
myText.autoSize = true; // automatically adjust the box to fit all text
myText.text ="Hello World";
0
 
Avatar-XCommented:
For more control, the best solution:

myTextField.text = "The text to display";
myTextField._width = myTextField.textWidth;
myTextField._height = myTextField.textHeight;
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now