Arguments to eventListener?

I have xml with button list info, name and link

 
<?xml version="1.0" encoding="utf-8"?>
<menulist>
<menuitem main="true" >
<itemname>home</itemname>
<link>test1.swf</link>
</menuitem>
<menuitem>
<itemname>about</itemname>
<link>test2.swf</link>
</menuitem>
</menulist>

I’ve managed to generate a list with buttons. Using a for loop. While generating them I’m also adding an eventlistener

 
for each(var value:XML in myXML.menuitem) {
obj[j] = new listmenuitem();
menucontainer.addChild(obj[j]);
obj[j].y = j*itemheight;
obj[j].button.addEventListener(MouseEvent.CLICK, onClick);
j++;
}

which nicely performs it. At this moment however the onclick function uses one link only…

 
public var externalswf:URLRequest;
public var dolink:String = "[http://www.somedomain.com](http://www.somedomain.com/)";
 
public function onClick(event:MouseEvent):void{
externalswf = new URLRequest(dolink);
navigateToURL(externalswf, "_top");
}

Is there a way to pass the xml value to the function, sort of like “delegate”?
Or an eays alernative?

P.