# Listener question

**URL:** <https://forum.kirupa.com/t/listener-question/155579>\
**Category:** Uncategorized\
**Created:** [July 18, 2005, 10:54pm UTC](https://forum.kirupa.com/t/listener-question/155579 "2005-07-18T22:54:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thinker2501](https://avatars.discourse-cdn.com/v4/letter/t/e0b2c6/32.png) [@Thinker2501](https://forum.kirupa.com/u/Thinker2501)\
**Post date:** [July 18, 2005, 10:54pm UTC](https://forum.kirupa.com/t/listener-question/155579/1 "2005-07-18T22:54:53Z")

</div>

I have an object contstructed as so:

contentSize = new Object();  
ASBroadcaster.initialize(contentSize);  
contentSize.addListener(box)  
contentSize = 400;

So the question is can I use onChange for the box listener to activate a function? I want to listeners to detect when contentSize has changed and run x function() without using if statements everyframe. Any tips?
