-
adjusting dynamic textfield, to fit its contents
I have a dynamic textfield "name" that is inside an mc on the main stage. This textbox gets changed by a variable being updated on a ClipEvent in another mc. How can I have the "name" text shrink and grow to the width of the contents?
Fly pelican, fly! ~ Tony Montana
-
Registered User
hi,
look at the autoSize property of the TextField class in your reference.
code:
TextField.autoSize
-
My textfield will display what the variable title holds. I can get it to do this by:code: _root.info = title;
But I can't get it to adjust to display all of the variable, it gets cut off. I've tried these two ways:code: _root.info.autoSize = title;
and code: _root.info = title;
_root.info.autoSize;
Neither works.
Last edited by atomicnuke; 11-21-2003 at 02:41 PM.
Fly pelican, fly! ~ Tony Montana
-
Registered User
code:
_root.info.autoSize = true;
-
In the code refrence in flash, it says saying code: _root.info.autoSize = left;
Will change the right and the bottom of the field to fit the contents. Tried that and that didn't work either, or the =true; code.
Fly pelican, fly! ~ Tony Montana
-
Anyone, know why this doesn't work?
Fly pelican, fly! ~ Tony Montana
-
Senior Member
Hi,
info has to be the instance name of the textfield (the textfield shouldn't have a variable name), assuming the texfield info is on the main timeline you can then use,
code:
_root.info.autoSize = "left";
_root.info.text = title;
-
Thank you very much, it finally works!
Fly pelican, fly! ~ Tony Montana
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|