# OMG am I going backwards now with code? Please see

**URL:** <https://forum.kirupa.com/t/omg-am-i-going-backwards-now-with-code-please-see/311266>\
**Category:** flash\
**Created:** [July 1, 2010, 3:20pm UTC](https://forum.kirupa.com/t/omg-am-i-going-backwards-now-with-code-please-see/311266 "2010-07-01T15:20:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jany](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jany](https://forum.kirupa.com/u/jany)\
**Post date:** [July 1, 2010, 3:20pm UTC](https://forum.kirupa.com/t/omg-am-i-going-backwards-now-with-code-please-see/311266/1 "2010-07-01T15:20:03Z")

</div>

```auto
var tf:TextField = new TextField();
var tfFormat:TextFormat = new TextFormat();
	tfFormat.size = 25;
	tf.defaultTextFormat = tfFormat;
	tf.text = "hiiii";
	addChild(tf);

```

That works fine… For 10 minutes though I had it like this and it wasn’t working:

```auto
var tf:TextField = new TextField();
          tf.text = "hiiii";
var tfFormat:TextFormat = new TextFormat();
	tfFormat.size = 25;
	tf.defaultTextFormat = tfFormat;
	addChild(tf);

```

Notice all I did was swap the tf.text placement. How in the heck is it not working in the second example? I mean am I just losing my noggin or what? Even in the adobe examples they have it set up like this. They have the text defined before the TextFormat just as I do in the second example. Unbelievable! lol Maybe flash has a bug?
