Try this, changing as and where needed:



// create one buttonObj for all your buttons

var buttonObj:Object={};

//////////////////////////////////////change nothing above...