4 Replies Latest reply on Nov 10, 2010 6:20 AM by mattcom

    Altering button click event programmatically


      Hi all.  I would like to pass in the click event action through my result.


      For example, I have an array that creates buttons through a repeater.


      Array = [{ label: 'Flex", action: "navigateToURL(new URLRequest('http://www.adobe.com/flex', '_blank'));"},

      { label: "Flash", action: "Alert.show('I like Flash too!');" }


      And then my repeater makes buttons like this


      <mx:Button label="{repeater.currentItem.label}"



      Now the above button works, but what I would like the button to do is the action itself, like this example below:


      <mx:Button label="{repeater.currentItem.label}"



      However, it does nothing.


      Any suggestions?  I have to be close...


      Thanks in advance!