Adding Variables from Input Text Fields

Flash 9/AS2

I’m still new to flash as and I have a form that will require the user to type in some figures (into the input text fields) which will need to be totaled up at the end.

Would it be recommended to execute this function by sending it to php and then back to flash or is there a better way to do it within flash?

Again all I want to do is get the sum of all input text variables (all having number values).

you can do math inside of flash.
here is an eg:


num1:Number = int(input_txt1.text);
num2:Number = int(input_txt2.text);
num3:Number = int(input_txt3.text);
num4:Number = int(input_txt4.text);


//do your math function now


total= num1+num2+num3+num4;
trace(total);

Ok, thanks for the reply. This form is one that has the user fill out info on the first page (frame 1) then to get to the next page (frame 2) the user hits the next buttons. There are a total of 4 pages. So my first question is which frame do I put this acton script? My second question is where will the sum appear.

use it on the frame where the text box is