jlackyashdya
09-12-2007, 12:12 PM
hi all,
i m developing one score board. I m using Input Text Fields for uer input.
Then i want to grab that values and make addition of those values.
I have one "+" sign button on stage. I have assign following code to it.
----------------------------------------------------------------------
on(press)
{
var total = 0;
var a = inputA1.text;
var b = inputA2.text;
var c = inputA3.text;
total = a + b;
trace(total);
}
----------------------------------------------------------------------
but its not doing addition.
its just showing me values of var a and var b entered by the user.
eg. if user enters "10" in inputA1 and "20" in inputA2. Then it should show me addition of "10 + 20" ie "30".
but its showing me "10" "20".
can anyone help me???
waiting for ur help
i m developing one score board. I m using Input Text Fields for uer input.
Then i want to grab that values and make addition of those values.
I have one "+" sign button on stage. I have assign following code to it.
----------------------------------------------------------------------
on(press)
{
var total = 0;
var a = inputA1.text;
var b = inputA2.text;
var c = inputA3.text;
total = a + b;
trace(total);
}
----------------------------------------------------------------------
but its not doing addition.
its just showing me values of var a and var b entered by the user.
eg. if user enters "10" in inputA1 and "20" in inputA2. Then it should show me addition of "10 + 20" ie "30".
but its showing me "10" "20".
can anyone help me???
waiting for ur help