Button variables.... help, please

hello, i’m just getting started with Action Script, its very fun. Anyways, I am trying to make this memory card sort of game, and I want to (I know there could be other ways, but now I want to do it like this) make every card a button. I have like 20 button each one called button1, button2, ect… anyways, when I make the function
this.[“button”+b].onPress = function()
{whatever} it won’t work, i know its because it does it doesn’t know what b is, how can i make my code realize that b is just the number after the instance name for any button. I don’t know if i’m being clear, but I mean, I just want b to take the value of the button I pressed, how can I do that, since I don’t want to make the same instruction for the 20 buttons I have… hope somebody gets this, and can help me thankyou!!!