# Calculator w. functions

**URL:** <https://forum.kirupa.com/t/calculator-w-functions/26533>\
**Category:** flash\
**Created:** [July 23, 2003, 10:01pm UTC](https://forum.kirupa.com/t/calculator-w-functions/26533 "2003-07-23T22:01:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![session9](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@session9](https://forum.kirupa.com/u/session9)\
**Post date:** [July 23, 2003, 10:01pm UTC](https://forum.kirupa.com/t/calculator-w-functions/26533/1 "2003-07-23T22:01:38Z")

</div>

I tried to make this simple addition thing, using functions. Ive posted the .fla. The user will put in 2 numbers, and i wanted it to add them together, and in the answer textbox, show the answer. Right now all it does is 5 + 3 = 53. So i dont know whats up.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 10:03pm UTC](https://forum.kirupa.com/t/calculator-w-functions/26533/2 "2003-07-23T22:03:33Z")

</div>

ah…i see.

_everyone_ has this problem. whenever you extract text from a textbox, it results to just that, text, or in other words, string type. What you need to do is convert that string to a number or integer by using the Number(_string_); function.

I guarantee that’s your problem.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 10:05pm UTC](https://forum.kirupa.com/t/calculator-w-functions/26533/3 "2003-07-23T22:05:03Z")

</div>

You need to convert string into number.

[edit] yep thoriphes was faster and explained better[/edit]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 10:11pm UTC](https://forum.kirupa.com/t/calculator-w-functions/26533/4 "2003-07-23T22:11:44Z")

</div>

Thats great, thanks a lot!

PS. Ive been timing you guys, this is your fastest time yet, half a second after i posted it! Thats awesome!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 10:12pm UTC](https://forum.kirupa.com/t/calculator-w-functions/26533/5 "2003-07-23T22:12:21Z")

</div>

Thoriphes - 1  
Claudio - 0

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2003, 10:14pm UTC](https://forum.kirupa.com/t/calculator-w-functions/26533/6 "2003-07-23T22:14:28Z")

</div>

> \*Originally posted by session9 \*  
> \*\*PS. Ive been timing you guys, this is your fastest time yet, half a second after i posted it! Thats awesome! \*\*  
> No problem 😛
