Resorting to the forum - dynamic buttons linkage

I’m just getting into the as3 stuff at the mo, and I’ve decided to try and code a rss feed as a way of getting into it, anyway I’ve got to a certain point and I can’t figure out how to get past it! - Any ideas oh gurus of kirupa?

Thanks!

Here’s what I’ve got… the problem is I can’t get the doSomething function to find the right id? Any ideas, solutions

Liam

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);





var xml:XML;

function onLoaded(e:Event):void{
	xml = new XML(e.target.data);
	//trace(xml.channel.item);
	//Get to specific xml contents
	var list_array:XMLList = xml.channel.item;
	trace(list_array.length());
	
	for(var i:uint=0; i<list_array.length(); i++){
		trace("hello");
		var menu_item:item=new item();
		menu.holder.addChild(menu_item);
		menu_item.y = 40*i;
		menu_item.id = i;
		menu_item.name_txt.text = list_array.title.text()*;
		menu_item.author_txt.text = list_array.author.text()*;
		menu_item.addEventListener(MouseEvent.MOUSE_DOWN,doSomething);

	}
}

function doSomething(evt:MouseEvent):void
		{
			trace(id);
		}