".creating a custom component and repeating that" yes, yes, yes. Pass in the entire currentItem and store it in a public variable, and then you will be able to code the repeated item cleanly and clearly. I'd suggest having the component dispatch an event on click, then listen for that in the repeater's parent. Use event.target.itemData(or whatever you named the public var) to get the text of the link and then build the full argument to navigateToeURL.
Tracy Spratt, Lariat Services, development services available _____ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Friday, February 12, 2010 11:43 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: navigateToURL error Try this... <mx:Text text="{imageRepeater.currentItem.linkText}" click="{navigateToURL(new URLRequest(imageRepeater.currentItem.link), 'blank');}" x="109" y="200" fontFamily="Gunplay" fontSize="14"/> Although I would recommend creating a custom component and repeating that. --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, Darrin Kay <dar...@...> wrote: > > I am tring to get some text become a link in a Flex3 app, but getting an > error I know the data is getting pulled in, in this case I hard coded the > xml with http://www.espn. <http://www.espn.com> com for testing so it is not the link. > > > > <mx:Repeater id="imageRepeater" dataProvider="{imageData.lastResult.panel}"> > > <mx:Panel id="MainPanel" xmlns:mx="http://www.adobe. <http://www.adobe.com/2006/mxml> com/2006/mxml" layout=" > absolute" title="{imageRepeater.currentItem.title}" width="450" height="253" > themeColor="#C4BA88" borderColor="#C4BA88" headerColors="#C4BA88" > roundedBottomCorners="true" > > backgroundImage="@Embed(source='images/backgroungLeftLogo.jpg')" > cornerRadius="15"> > > <mx:TextArea id="panelSub" x="109" y="24" width="316" height="33" alpha="0" > fontFamily="Gunplay" htmlText="{imageRepeater.currentItem.sub}" fontSize="22 > "/> > > <mx:TextArea id="panelBody" x="109" y="56" width="316" height="136" alpha="0" > fontFamily="Gunplay" htmlText="{imageRepeater.currentItem.body}" fontSize=" > 16" textAlign="center" themeColor="#C4BA88"/> > > <mx:Text text="{imageRepeater.currentItem.linkText}" click="navigateToURL(* > new* URLRequest({imageRepeater.currentItem.link}), *'blank'*);" x="109" y=" > 200" fontFamily="Gunplay" fontSize="14"/> <!-- the errors are on this > line --> > > </mx:Panel> > > </mx:Repeater> > > > > the above code will not compile: > > 1084 : Syntax error: expection colon before dot. > > 1084 : Syntax error: expection identifier before rightbrace. > > > > > > thanks for the help, > > D >