Determine Variable Value Change


I am developing a movie, wherein the value of a variable changes over time. I wanted to determing whatever the new value is, immideatly after the value changes, and play a movie clip. could you please suggest a code that will do this? Is there a ready-made function for this purpose?

Thanks in advance! Any help is appreciated.