# Text field of dreams

**URL:** <https://forum.kirupa.com/t/text-field-of-dreams/29408>\
**Category:** Uncategorized\
**Created:** [August 26, 2003, 2:59pm UTC](https://forum.kirupa.com/t/text-field-of-dreams/29408 "2003-08-26T14:59:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![andynm156](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@andynm156](https://forum.kirupa.com/u/andynm156)\
**Post date:** [August 26, 2003, 2:59pm UTC](https://forum.kirupa.com/t/text-field-of-dreams/29408/1 "2003-08-26T14:59:28Z")

</div>

Hi,

I’m new and I am trying to make a flash time calculator that takes input text(numbers only) from multiple input fields and updates a total box as the user changes the values. Kind of like an ecxel spreasheet would.

My problem is that I cannot get the total box to display the output.

Does anyone have a solution?

Thanks in advance!

andy

---

<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:** [August 26, 2003, 3:33pm UTC](https://forum.kirupa.com/t/text-field-of-dreams/29408/2 "2003-08-26T15:33:09Z")

</div>

I believe your problem is that anything coming from an Input box, Flash is going to think it is a string and in programming you can’t add strings up. So, you need to declare the var as an Int.

---

<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:** [August 26, 2003, 4:17pm UTC](https://forum.kirupa.com/t/text-field-of-dreams/29408/3 "2003-08-26T16:17:12Z")

</div>

Hi DP!

Like I said I’m kinda new at this…Do you know where I can look at an example?

Cheers,  
andy

---

<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:** [August 26, 2003, 4:25pm UTC](https://forum.kirupa.com/t/text-field-of-dreams/29408/4 "2003-08-26T16:25:05Z")

</div>

then… as far as I can see you only need!  
total = Int(something1)+Int(something2)

just add the strings to be added up in Int();

---

<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:** [August 26, 2003, 4:31pm UTC](https://forum.kirupa.com/t/text-field-of-dreams/29408/5 "2003-08-26T16:31:40Z")

</div>

Thanks! But is there a way to show the total in real time as the fields are added to. So it updates as changes are made. I was trying to nest it into a movie clip with an enterFrame. Am I on the right track?

Thanks again!

Andy

---

<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:** [August 26, 2003, 5:28pm UTC](https://forum.kirupa.com/t/text-field-of-dreams/29408/6 "2003-08-26T17:28:02Z")

</div>

Yes, use an onChanged handler. 😉

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=31224](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=31224)

---

<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:** [August 26, 2003, 5:42pm UTC](https://forum.kirupa.com/t/text-field-of-dreams/29408/7 "2003-08-26T17:42:07Z")

</div>

Gracias, kind people!

I have been struggling with this for longer than I’d like to admit.

It works great!

Sincerely,  
Andy:)
