?
Solved

Resizing dynamic text fields

Posted on 2003-02-19
3
Medium Priority
?
206 Views
Last Modified: 2011-04-14
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
Comment
Question by:lukathonic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:rexmor
ID: 7984741
Maybe you can use createTextField() in FlashMX you can set the width,height,depth... dynamically.

Hope this helps

rex
0
 
LVL 6

Accepted Solution

by:
henryww earned 300 total points
ID: 7985500
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
 

Expert Comment

by:Avatar-X
ID: 8031540
For more control, the best solution:

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question