Did you declare the variable "theChange" as Bindable? This works for me:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.binding.utils.BindingUtils; [Bindable] public var theChange:Boolean; private function init():void { BindingUtils.bindProperty(this,"onChange", this, "theChange" ); } public function set onChange(value:Boolean):void { Alert.show("change happen"); } private function finishit():void { theChange = true; theChange = false; } ]]> </mx:Script> <mx:Button x="105" y="359" label="save" click="finishit()"/> </mx:Application> --- In flexcoders@yahoogroups.com, "markflex2007" <[EMAIL PROTECTED]> wrote: > > Hi, > > I did a simple test for changewatch.I try to watch a variable > change.but I am not sure why it doesn't work. > > (variable "theChange" change from true to false) > > The code is here: > > BindingUtils.bindProperty(this,"onChange", this, "theChange" ); > > } > > public function set onChange (value:Boolean):void > { > Alert.show ("change happen"); > } > > > > private function finishit():void{ > > theChange = true; > theChange = false; > > > > } > > > ]]> > </mx:Script> > > > <mx:Button x="105" y="359" label="save" click="finishit()"/> > > > </mx:Application> > > Thanks for help > > Mark >