# I hope this helps someone with text

**URL:** <https://forum.kirupa.com/t/i-hope-this-helps-someone-with-text/308064>\
**Category:** flash\
**Created:** [April 16, 2010, 2:32pm UTC](https://forum.kirupa.com/t/i-hope-this-helps-someone-with-text/308064 "2010-04-16T14:32:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m2244](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@m2244](https://forum.kirupa.com/u/m2244)\
**Post date:** [April 16, 2010, 2:32pm UTC](https://forum.kirupa.com/t/i-hope-this-helps-someone-with-text/308064/1 "2010-04-16T14:32:52Z")

</div>

I just spent 2 hours trying to figure out why my text was not showing up after I assigned a new text string to a textFiled. Basically, you must reassign the text format every time you reassign the text. Why?

```auto

var formatNormal:TextFormat = new TextFormat("Lucida Console",15,0xFFFFFF);
//formatNormal
var tf1:TextField = new TextField();
tf1.width = stage.stageWidth;
tf1.autoSize = TextFieldAutoSize.LEFT;
tf1.x = tf1.y = 0;
this.mcContentOnStage.addChild(tf1);
[COLOR=red]tf1.text = string1;
tf1.setTextFormat(formatNormal);[/COLOR] //Format must be set after text is assigned!!!!

 
function handleNext(evt:Event):void
{
 clickCount++;
 / ******This switch statement handles populating the scrollpane each time the user clicks next.***** /
 switch (clickCount)
 {
  case 1 :
   [COLOR=red]tf1.text = string2;
[/COLOR] [COLOR=red]tf1.setTextFormat(formatNormal);[/COLOR]

```
