you can't put a databinding expression in the middle of a script block. Try
this instead:
<mx:LinkButton label="{extLink}" data="{extLinkURL}"
click="loadXternalURL(LinkButton(event.currentTarget).data as String)"
id="LinkBtn2" />
HTH,
Sam
-------------------------------------------
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Vincent Rempp
Sent: Monday, December 10, 2007 10:47 AM
To: [email protected]
Subject: [flexcoders] Data binding in a function call
Hi evryone,
I'm trying to display a linkButton in a flex application for wich the
displayed text and the link are loaded from an external xml file.
I can't get the link to be passed at my function. here is the code :
I get a {extLinkURL} in my alert box. Something must be wrong with the
quotes.
any ideas?
Thanks,
Vincent
<?xml version="1.0" encoding="utf-8"?>
<mx:Script>
<![CDATA[
...
]]>
</mx:Script>
<mx:HTTPService id="fiche2Service" url="xmlfile.xml" resultFormat="e4x"
result="resultHandler(event)"/>
<mx:VBox left="20" top="20">
<mx:LinkButton label="{extLink}"
click="loadXternalURL('{extLinkURL}')" id="LinkBtn2" />
</mx:VBox>
</mx:Canvas>