# Resorting to the forum - dynamic buttons linkage

**URL:** <https://forum.kirupa.com/t/resorting-to-the-forum-dynamic-buttons-linkage/255482>\
**Category:** flash\
**Created:** [March 23, 2008, 2:31pm UTC](https://forum.kirupa.com/t/resorting-to-the-forum-dynamic-buttons-linkage/255482 "2008-03-23T14:31:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nortago](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nortago/32/1240_2.png) [@nortago](https://forum.kirupa.com/u/nortago)\
**Post date:** [March 23, 2008, 2:31pm UTC](https://forum.kirupa.com/t/resorting-to-the-forum-dynamic-buttons-linkage/255482/1 "2008-03-23T14:31:09Z")

</div>

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

```auto
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);
		}

```
