# Watch for changes in variables

**URL:** <https://forum.kirupa.com/t/watch-for-changes-in-variables/210067>\
**Category:** flash\
**Created:** [December 14, 2006, 5:34pm UTC](https://forum.kirupa.com/t/watch-for-changes-in-variables/210067 "2006-12-14T17:34:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esseti](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@Esseti](https://forum.kirupa.com/u/Esseti)\
**Post date:** [December 14, 2006, 5:34pm UTC](https://forum.kirupa.com/t/watch-for-changes-in-variables/210067/1 "2006-12-14T17:34:20Z")

</div>

How can I ‘watch’ for changes in the \_width, scroll, maxscroll properties other than onEnterFrame / setInterval etc. Btw. I tryed \<object\>.watch but found this in the AS ref:

"Generally, predefined ActionScript properties, such as \_x, \_y, \_width, and \_height, are getter/setter properties and cannot be watched with Object.watch(). "

Why do I need this? Im making a dynamic textfield with a scrollbar that will display loaded text, but here’s the catch. The site is on a single frame, and has a button that uses a resizeTo() function (a Flash extension) on the textfield and changes it’s \_width value. So thats why I need to update these values for the scrollbar to be accurate.

I’ve searched the forum, in hopes that somebody have made something like this before, but no luck ; (.

Thanks for the help.
