# Why is this text field tracing "undefined"?

**URL:** <https://forum.kirupa.com/t/why-is-this-text-field-tracing-undefined/273059>\
**Category:** Uncategorized\
**Created:** [October 10, 2008, 5:06pm UTC](https://forum.kirupa.com/t/why-is-this-text-field-tracing-undefined/273059 "2008-10-10T17:06:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragonfly](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dragonfly](https://forum.kirupa.com/u/dragonfly)\
**Post date:** [October 10, 2008, 5:06pm UTC](https://forum.kirupa.com/t/why-is-this-text-field-tracing-undefined/273059/1 "2008-10-10T17:06:05Z")

</div>

Please help me kirupians!

when i run:

```auto
var headerTxt:TextField = this.createTextField(header_txt,0,200,150,550,20);
trace(headerTxt);

```

it traces:

```auto
_level0.undefined

```

why would it do this? When I refer to headerTxt in code, i can set its format, properties and populate it with text, no problem. Yet it traces as undefined, and this is (im assuming) giving me a problem with removing the textfield from another function…

EDIT: ok, i solved my issues by just scoping the vars for the txt fields outside of the functions… but still, why is it tracing undefined???
