# ComboBox Value concatenating instead of adding

**URL:** <https://forum.kirupa.com/t/combobox-value-concatenating-instead-of-adding/262517>\
**Category:** flash\
**Created:** [June 6, 2008, 4:11pm UTC](https://forum.kirupa.com/t/combobox-value-concatenating-instead-of-adding/262517 "2008-06-06T16:11:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nixon](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nixon](https://forum.kirupa.com/u/nixon)\
**Post date:** [June 6, 2008, 4:11pm UTC](https://forum.kirupa.com/t/combobox-value-concatenating-instead-of-adding/262517/1 "2008-06-06T16:11:48Z")

</div>

I’m trying the add the data value of a selected combo box item (.35) to 1 using:

var theFringe:Number = \_root.calc.fringe.getValue();  
\_root.calc.fFringe.text = theFringe+1;

Returns: .351

Is there a way to convert the data from the comboBox to an integer so that when I add .35 +1 I’ll get 1.35?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![nixon](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nixon](https://forum.kirupa.com/u/nixon)\
**Post date:** [June 6, 2008, 4:34pm UTC](https://forum.kirupa.com/t/combobox-value-concatenating-instead-of-adding/262517/2 "2008-06-06T16:34:09Z")

</div>

[quote=nixon;2338096]I’m trying the add the data value of a selected combo box item (.35) to 1 using:

var theFringe:Number = \_root.calc.fringe.getValue();  
\_root.calc.fFringe.text = theFringe+1;

Returns: .351

Is there a way to convert the data from the comboBox to an integer so that when I add .35 +1 I’ll get 1.35?

Thanks in advance![/quote]

**Update:**  
I had to change my variable to:  
var theFringe:Number = Number(\_root.calc.fringe.getValue()); //added Number(…)
