Saturday, May 7, 2011

How to watch Bindable vars in Actionscript code

Bindable vars can be watched by the MXML components - but what if we want to see in Actionscript code if bindable var is changed? Is there any way to do that? Of course there is! The class we need is mx.binding.utils.ChangeWatcher. Unfortunately this class has many downsides and generally works worse than binding in MXML, but nevertheless it's still quite useful. As usual let's start with the