Hi, I am going through the squirrel tutorial in the XML intro. I want to assign a different action/link to each dynamically created button. How do i access each of the buttons do to so? Is this possible? Here is the example of code from the tutorial. Its a basic loop that goes through an xml file and creates a menu from the information there. I appreciate your help, thanks!
[SIZE=1]
[/SIZE]function CreateMenu(menu_xml){
var items = menu_xml.firstChild.firstChild.childNodes;
for (var i=0; i<items.length; i++) {
if (items*.attributes.type == “squirrel”) {
var species = items*.firstChild;
var location = items*.childNodes[1];
var item_mc = menu_mc.attachMovie(“menu_item”,“item”+item_count, item_count);
item_mc._y = item_count * item_spacing;item_count++;
item_mc.species_txt.text = species.firstChild.nodeValue;
item_mc.main_btn.location_text = location.firstChild.nodeValue;
item_mc.main_btn.onRelease = DisplayInfo;
}
}
}