I have this Code:
BindingUtils.bindProperty(trollImage, "width", vslider, "value");
BindingUtils.bindProperty(trollImage, "height", vslider, "value");
and the aproppriate Components are written in MXML:
<s:Image id="trollImage" source="http://clansql.comoj.com/meme/trollface-square.png"/>
<s:VSlider id="vslider" height="400" maximum="600" minimum="5" value="400"/>
I create the Bindings by pressing a button. And after I pressed another button, the binding should be removed.
I found a solution for Flex 3.5 here, but that doesn’t work for Flex 4.5 because the Components don’t have a _bindings property. How is that in Flex 4.5? Can someone tell me please?
Thanks a lot!
That Flex 3.5 solution looks very hackish to me anyway.
You should use ChangeWatcher#unWatch(). The
BindingUtils#bindProperty()function returns an instance of ChangeWatcher.In your case that would result in something like this: