anonymous
2009-05-18 15:52:35 UTC
I want to make a simple calculator. It has two input text fields called first and second. It has a dynamic text box called total. And two symbols which are buttons.
I'm using action script to take the input in the two fields and either add them or subtract them depending on which button is press and display them in the dynamic box. My code follows:
on (release) { total = Number(first) + Number(second);}.
No matter what I do when it tries to take Number() it always returns a NaN error. I have even embed only numerals in my text box and still the error persists.