Bind with BindingUtils.bindSetter
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="initHandler();">
<mx:Script>
import mx.binding.utils.ChangeWatcher;
import mx.binding.utils.BindingUtils;
private var myChangeWatcher:ChangeWatcher;
private function initHandler():void
{
myChangeWatcher = BindingUtils.bindSetter( invalidateName, nameInput, "text" );
}
private function invalidateName( arg:* ):void
{
nameField.text = nameInput.text;
}
</mx:Script>
<mx:Panel title="User Entry.">
<mx:TextInput id="nameInput" />
<mx:Text id="nameField" />
</mx:Panel>
</mx:Application>
Related examples in the same category