# 1120:Access to undefined property input\_txt

**URL:** <https://forum.kirupa.com/t/1120-access-to-undefined-property-input-txt/299353>\
**Category:** flash\
**Created:** [November 3, 2009, 7:11pm UTC](https://forum.kirupa.com/t/1120-access-to-undefined-property-input-txt/299353 "2009-11-03T19:11:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadaj](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kadaj/32/9061_2.png) [@kadaj](https://forum.kirupa.com/u/kadaj)\
**Post date:** [November 3, 2009, 7:11pm UTC](https://forum.kirupa.com/t/1120-access-to-undefined-property-input-txt/299353/1 "2009-11-03T19:11:31Z")

</div>

Hi,  
I have been battling with this. I have a TextArea instance named input\_txt  
I add an event listener to it. and a function readInput().  
Flash shows Access to undefined property input\_txt 2 times.  
This is by doing the OOP way. When writing in the timeline no problems are found.  
I think its the problem to find the package to import.  
Any idea what’s causing this?

I have imported:

```auto
fl.controls.TextArea;
fl.events.*;
flash.events.*;
flash.display.*;
flash.text.*;

```

```auto

private function readInput(event:Event)
 {
      input = input_txt.text;
       trace(input);
 }
 input_txt.addEventListener(ComponentEvent.ENTER, readInput);

```

Writing code using packages is really consuming a lot more time… ah!
