Button loading text

Hi all,

I am interested in using buttons to enter digits into a dynamic text field. An example would be an atm machine, where you select digits 0 - 9, you can hit OK or Cancel to clear the field.

Things that I understand:

I can use…

on (release) {
AddDigit(“1”);
}

…to enter the individual digits.

Things that I am unclear about:

(1) How do I link the various buttons to the specific text field.
(2) How do I create the OK button to initiate another action, such as playing a movieclip etc.
(3) How do I cancel the items currently in the field.

I have looked over various tutorials on making calculators, but it is very complex for my skill level. Thanks for the help!

Haus