?
Solved

How to make dynamic text expand to fit text Flash CS4?

Posted on 2011-02-27
2
Medium Priority
?
567 Views
Last Modified: 2012-06-21
I have dynamic text converted to an so I can expand the dynamic text by 500% through a tween. The text ( a single word) in the box will change periodically so I can't say exactly how large of a box I'll need.

As the word in the box changes sometimes it fits, sometime it is just truncated at the right end. Sure wish the dynamic text box would expand itself to fit the text.

Anyway to do this without making the dynamic text box as big as my stage to start with?
0
Comment
Question by:chevronrod
[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
2 Comments
 
LVL 17

Accepted Solution

by:
deepanjandas earned 2000 total points
ID: 34993987
Yes, using autosize property:

Try this sequence:
var titleFormat:TextFormat = new TextFormat();
titleFormat.bold = true;
titleFormat.color = 0xFFFFFF;
titleFormat.size = 14;

var titleLabel:TextField = new TextField();
titleLabel.defaultTextFormat = titleFormat;
titleLabel.autosize = "left";
titleLabel.label = data;
addChild( titleLabel );

Open in new window


Warm Regards
Deepanjan Das
0
 

Author Closing Comment

by:chevronrod
ID: 34994021
Too bad they don't put autosize (and maybe some others) in the Properties panel of text boxes....
0

Featured Post

Introducing Priority Question

Increase expert visibility of your issues by participating in Priority Question, our latest feature for Premium and Team Account holders. Adjust the priority of your question to get emergent issues in front of subject-matter experts for help when you need it most.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

743 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