# Math troubles with addition

**URL:** <https://forum.kirupa.com/t/math-troubles-with-addition/213823>\
**Category:** flash\
**Created:** [January 23, 2007, 3:46pm UTC](https://forum.kirupa.com/t/math-troubles-with-addition/213823 "2007-01-23T15:46:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lostnights](https://avatars.discourse-cdn.com/v4/letter/l/ea5d25/32.png) [@lostnights](https://forum.kirupa.com/u/lostnights)\
**Post date:** [January 23, 2007, 3:46pm UTC](https://forum.kirupa.com/t/math-troubles-with-addition/213823/1 "2007-01-23T15:46:35Z")

</div>

My script is conjoining the two values instead of adding them together.  
So instead of 2 + 2 = 4, 2 + 2 = 22

calculate\_btn.onPress = function() {  
textbox3\_txt.text = textbox1\_txt.text + textbox2\_txt.text  
}

textbox1 = input text with instance name of textbox1\_txt  
textbox2 = dynamic text with instance name of textbox2\_txt  
textbox3 = dynamic text with instance name of textbox3\_txt

The problem is only with addition. Multiplication, division and subraction all work fine.
