You cannot do this: click="navigateToURL(myrepeater.currentItem.url)"
You will get an error. currentItem only exists when the repeater is executing, not when the "click" action happens. For simple cases, you can use getRepeaterItem() in the handler. For even slightly more complex repeated components, create a custom component and repeat that. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of tim.geiges Sent: Monday, November 24, 2008 8:32 PM To: [email protected] Subject: [flexcoders] Re: help here with an item renderer If I understand what you are asking then in the buttons within the repeater you just add the click="" to point to your function, like <mx:Repeater id="myrepeater"> <mx:Button click="navigateToURL(myrepeater.currentItem.url)"/> </mx:Repeater> and my XML would look more like <button id="button1" url="http://www.someurl.com <http://www.someurl.com> "></button> hope I'm not way off what you are aasking there :-) Tim G. --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , Gustavo Duenas <[EMAIL PROTECTED]> wrote: > > Hi I have a xml file and it has a <button1>800</button1> and so > forth, and also I have a repeater (a horizontal list) which grabs the > xml and the item renderer with a button, instead of doing the horizontal > list do the click I'd like to make the button inside the item > renderer to do that. > > how could I do that? > > I was trying to use > in the item rendered > > private function send():void{ > > <mx:Script> > <![CDATA[ > public function send(event:MouseEvent):void{ > var urlRequest : URLRequest = new URLRequest("{data.button1}"); > navigateToURL( urlRequest, "_self" ); > } > ]]> > </mx:Script> > > and in the button: click="send()" > > so far, it is just putting in my browser mybroser/{data.button1} > but I'd like to put in there the URL, how could I? > > Regards, > > Gus > > > Gustavo A. Duenas > Creative Director > LEFT AND RIGHT SOLUTIONS > 904. 265 0330 - 904. 386 7958 > www.leftandrightsolutions.com > Jacksonville - Florida >

