title: Can I bind a Flex component property to a function?
body: <p>I want to set the <strong><em>enabled</em></strong> property on a button based on the return value of a function that has one or more parameters. How can I do this?</p>
  
  <pre><code>private function isUserAllowed (userName:Boolean):Boolean {
     if (userName == 'Tom')
        return true;
     if (userName == 'Bill')
        return false;
  }
  
  &lt;mx:Button label="Create PO" id="createPOButton"
  enabled="&lt;I want to call isUserAllowed ('Bill') or isUserAllowed ('Tom') here&gt;"
  click="createPOButton_Click()" /&gt;
  </code></pre>