Alternative to onChanged

I have some code that will be generating data into a TextField. However I want to be able to monitor when the TextField is updated, a function is called.

Currently the onChanged command will only work when a user has entered information into the TextField and not when data is inserted via actionscript.

Anyone explain to me how I can monitor the change to the TextField when using actionscript to input data, but work the same as the onChanged command?