# Addition problem with script

**URL:** <https://forum.kirupa.com/t/addition-problem-with-script/122952>\
**Category:** Uncategorized\
**Created:** [September 18, 2004, 8:56pm UTC](https://forum.kirupa.com/t/addition-problem-with-script/122952 "2004-09-18T20:56:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![byersj21](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@byersj21](https://forum.kirupa.com/u/byersj21)\
**Post date:** [September 18, 2004, 8:56pm UTC](https://forum.kirupa.com/t/addition-problem-with-script/122952/1 "2004-09-18T20:56:25Z")

</div>

OK… I’m still learning a bit about flash… but here’s my problem. I was just curious and messing about with variables… and decided to make an addition caculator… nothing fancy…

I first made 3 text boxes… 2 of them are input and one is dynamic… the first 2 have variable names of number1 and number2. The dynamic box variable is value… Then I made an invisible button that works when you hit the \<enter\> key. In that code, I basically just say value = number1 + number2 … but when I type say 20 in number 1 and 20 in number 2 box… I get 2020 for the value. I understand that this would work fine for strings, but I’m trying to add 2 numbers together. Now if I subtract or multiply… it works fine, but the addition isn’t. Any ideas why this is… or do I need to do this another way?
