I want to create a dynamic interfaces for items in an inventory. I need the items to be button to view that item. And want that button to calla function with the item id as an argument. inventory[index].button = game.add.button(inventory[index].x - (1030/2), inventory[index].y, 'equipmentButton', this.EquipItem, this); ... EquipItem: function(index) { };