# Tracking words in an input txt box

**URL:** <https://forum.kirupa.com/t/tracking-words-in-an-input-txt-box/324818>\
**Category:** flash\
**Created:** [September 10, 2011, 8:56am UTC](https://forum.kirupa.com/t/tracking-words-in-an-input-txt-box/324818 "2011-09-10T08:56:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![silverneo188](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@silverneo188](https://forum.kirupa.com/u/silverneo188)\
**Post date:** [September 10, 2011, 8:56am UTC](https://forum.kirupa.com/t/tracking-words-in-an-input-txt-box/324818/1 "2011-09-10T08:56:46Z")

</div>

Ok so basically my problem is I have an input box and I want it to track if anywhere in the text box a certain word is typed then something happens. Here is what I got so far.

```auto

wordTracker = new Object();
wordTracker = function () {
if(txt_input.split == "word"){
trace("success");
}
}
Key.addListener(wordTracker);

```

but it doesn’t work. An example of what i want to happen is for instance lets say the user enters this into the txt box  
_“I like to type a word into documents”_ because the word “word” was typed in there it would trigger the **trace** action but it doesn’t how do i get this to work?**[SIZE=5][/SIZE]**
