Even easier, would be to change the var to a getter/setter, and execute the 
function in the setter.

-TH

--- In flexcoders@yahoogroups.com, "Christopher McArthur" <cmcart...@...> wrote:
>
> assuming your in the same class as changeme:
> 
> private var changemeWatcher:ChangeWatcher;
> 
> this.changemeWatcher = ChangeWatcher.watch(this, "changeme", 
> changemeChangedFunction);
> 
> this function will get called every time it changes:
> private function changemeChangedFunction(event:PropertyChangeEvent):void
> 
> when you are done, make sure to uregister it with
> this.changemeWatcher.unwatch();
> 
> __________________________________________________________________________________________________
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of luvfotography
> Sent: Friday, November 20, 2009 3:02 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] I've got a [Bindable] boolean var - can I setup a 
> eventlistener on it?
> 
>   
> I've declared a [Bindable] private var changeme:Boolean;
> 
> Is there a way to execute a function whenever this var changes?
> 
> thanks,
>


Reply via email to