Adding values when pressing a button

Hi,

Im making 6 buttons all with different values. When you press one button the number that button holds will show up in 2 dynamic textfields.

In the first field the numbers will come upp in a list form, one under another.

and in the second textfield the number that the buttons have will add up.

I have tried for some days now but cant come up with anything that worked.

Haved tried with thisfor one button:
totalsum.text += Number(totalsum.text) + 22;

and this for the next:
totalsum.text += Number(totalsum.text) + 33;

it works but it places the numbers after another and if you keep klicking the same button the numbers just keep going.

Please, I could really use some help with this… should I use an Array?

Chris