I am just trying to add two numbers togeather which I input in to input textboxes. And then when I click a button the answer appears in a dynamic textbox.
Heres the code am using on my clac_btn button:
Quote:
on(release) {
amount = item1 + item2;
}
|
When I do it this way it automaticlly treats item1 and item2 input textboxes as string and say if item1 = 2 and item2 = 3 the amount value will be 23
I have also tried this:
Quote:
on(release) {
amount = Number(item1) + Number(item2);
}
|
That just come back as NaN in all three inputtext boxes.
Can anyone tell me how its done or tell me a tip or a better way of doing what im tring to do.
