# addEventListener to a variable?

**URL:** <https://forum.kirupa.com/t/addeventlistener-to-a-variable/243397>\
**Category:** flash\
**Created:** [November 6, 2007, 5:36pm UTC](https://forum.kirupa.com/t/addeventlistener-to-a-variable/243397 "2007-11-06T17:36:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [November 6, 2007, 5:36pm UTC](https://forum.kirupa.com/t/addeventlistener-to-a-variable/243397/1 "2007-11-06T17:36:34Z")

</div>

I know it’s possible to add an event listener to a button so you can see when it’s been clicked but can you add one to a variable to perform an action when the variable changes or do i just have to use an onEnterFrame function to check the value and act on it if it’s changed?
