Reputation: 9205
I've got a text field created using the Flash's Text Tool I set it to dynamic. Is it possible to edit that text using AS3? If yes how?
Upvotes: 0
Views: 581
Reputation: 2220
You can use all the properties of the textfield. So
both
textfield.text
and
textfield.htmlText
will work.
If the textfield is too small, use the autoSize
property:
textfield.autoSize = "left";
textfield.htmlText = "<b>hello,\nworld</b>";
will output:
hello,
world
with bold text.
You can also change the multiline
property, the wordWrap
, background
and so on.
Upvotes: 3
Reputation: 39456
Click the text field and set an instance name for it in the properties panel. From here you can access the text field via:
your_instance_name
So to set the text is as easy as:
your_instance_name.text = "your new text";
Upvotes: 0