# Detecting a text change in a dynamic text field

**URL:** <https://forum.kirupa.com/t/detecting-a-text-change-in-a-dynamic-text-field/275167>\
**Category:** flash\
**Created:** [November 10, 2008, 8:00pm UTC](https://forum.kirupa.com/t/detecting-a-text-change-in-a-dynamic-text-field/275167 "2008-11-10T20:00:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrbelv](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mrbelv](https://forum.kirupa.com/u/mrbelv)\
**Post date:** [November 10, 2008, 8:00pm UTC](https://forum.kirupa.com/t/detecting-a-text-change-in-a-dynamic-text-field/275167/1 "2008-11-10T20:00:32Z")

</div>

I have a dynamic text box that gets its content from an XML file. When the use clicks on a nav item, a different node in the XML is displayed in the text box.

I’m looking for a way for the text box to be able to detect if the text it contains has changed.

I tried this, but it doesn’t seem to work:

function test(event:Event): void {  
trace(“The text has changed”);  
}

contentTxt.addEventListener(Event.CHANGE, test);

Is there a way to do this?
