I'm not quite sure about Flash 5, but if you are using FlashMX then this would be a cool way to do it (this technique from Flash MX ActionScripting by Derek Franklin & Jobe Makar)
fieldname.onSetFocus = function()
// when user sets cursor on text field do this
// your script dont need this
// if so forget about onSetfocus
fieldname.onKillFocus = function()
// this functions is called when
// cursor leaves specified text field
/* So you could make a calculation function and place the function call here or ... like
aValue = a
bValue = a
// Git u'r values her git u'r values here
// all text fields are objects in FlashMX
// so do whateverYourFielddName.text
// to access the field value
// if your Field is somewhere else ...
// aValue = pathToTextField.a
// dont forget to give them instance names
// Simple field validation
if (aValue != "" && bValue != "")
cValue.text = aValue + bValue;
This should update field c when cursor leaves text field
Anyway, this script is to be placed on the timeline of a movieClip, have not tried putting it on the Main time line, so i donno if that'll work.
This is actually akin to ...
... on Flash 5 except i'm not sure what the event handler is called for this particular function in Flash 5 or IF flash 5 has this event handler.
Let me be clearer ... ahem, Put all you text fields in a movieClip give them instance names and place the onKillfocus event handler on the timeline IN that movie clip.
Last note, you should validate if text field value is non numerical too in order to catch all uncertainties ... and do a onKillFocus for both field a and b