# \[AS3.0\] Listener at change of variable value

**URL:** <https://forum.kirupa.com/t/as3-0-listener-at-change-of-variable-value/331714>\
**Category:** flash\
**Created:** [October 3, 2013, 12:12am UTC](https://forum.kirupa.com/t/as3-0-listener-at-change-of-variable-value/331714 "2013-10-03T00:12:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vito\_Lipari](https://avatars.discourse-cdn.com/v4/letter/v/df705f/32.png) [@Vito\_Lipari](https://forum.kirupa.com/u/Vito_Lipari)\
**Post date:** [October 3, 2013, 12:12am UTC](https://forum.kirupa.com/t/as3-0-listener-at-change-of-variable-value/331714/1 "2013-10-03T00:12:27Z")

</div>

[FONT=Ubuntu, Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif][COLOR=#101010]Hi to everybody,  
How can i create a listener for listening the change value of a variable?

exsample:

```auto

[/COLOR][/FONT][COLOR=#000000][FONT=monospace]var obj : MyClass = new MyClass(); [/FONT][/COLOR]
[COLOR=#000000][FONT=monospace]obj.myNumber = 10; [/FONT][/COLOR]

[COLOR=#000000][FONT=monospace]obj.addEventListener(MyEvent.CHANGE_VALUE, myFunc); [/FONT][/COLOR]

[COLOR=#000000][FONT=monospace]obj.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]myNumber[/FONT][/COLOR][COLOR=#000000][FONT=monospace] = 25;[/FONT][/COLOR][FONT=Ubuntu, Lucida Grande, Trebuchet MS, Verdana, Helvetica, Arial, sans-serif][COLOR=#101010]

```

[/COLOR][/FONT]
