Detect if a value has been changed

how to know if a value has been changed without using onEnterFrame?

ex: I want to know if the value of “myValue” is still 1
if it isn’t, then trace(“hello”)