So, simply...
buttons.xml:
<buttons>
<button label="Apple" url="http://www.apple.com"/>
<button label="Amazon" url="http://www.amazon.com"/>
<button label="EBay" url="http://www.ebay.com"/>
<button label="Adobe" url="http://www.adobe.com"/>
</buttons>
mycanvas.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Button label="{data.label}" click="{navigateToURL(new
URLRequest(data.url), '_self')}"/>
</mx:Canvas>
Application:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Model id="myButtons" source="buttons.xml"/>
<mx:HorizontalList dataProvider="{myButtons.button}"
itemRenderer="mycanvas"
columnCount="4" columnWidth="100"/>
</mx:Application>
--- In [email protected], Gustavo Duenas <[EMAIL PROTECTED]> wrote:
>
> Sorry , sometimes the ideas are faster than words.
>
> 1. I have a xml list
>
> 2. I have an horizontal list that uses this xml list(model) as
> dataprovider
>
> 3. I have a canvas which is the item renderer(mycanvas.mxml), this is
> the place where the button is.
>
> I'd like to know how can I make my button (in the item renderer) to
> click on the url which is in the xml list <button1>url1.com</button1>
>
> Regards,
>
> Gustavo
>
> P.D: Pfuii! I hope I'm clear now.