I have an image which its开发者_StackOverflow社区 source depends on a bindable property of another object. I'd like to know when this source changes, for example, by capturing the bind event or another related event of the Image control.
Thanks in advance.
There's a few ways to do this. One was is to use Bindsetter
private function creationComplete(event:FlexEvent):void{
BindingUtils.bindSetter(changeImage,hostObject,"image"); //assuming hostObject contains the property "image"
}
private function changeImage(imageSource:String){
//Set the image in here... do whatever else you wanted to do.
}
精彩评论