# How to Display Pressed Numbers

**URL:** <https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033>\
**Category:** flash\
**Created:** [February 4, 2004, 11:39am UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033 "2004-02-04T11:39:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![abichap](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@abichap](https://forum.kirupa.com/u/abichap)\
**Post date:** [February 4, 2004, 11:39am UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033/1 "2004-02-04T11:39:13Z")

</div>

Hi people. The situation is as such : I have a picture of handphone with its keypad. On its keypad are buttons of 0 to 9. How do I display the numbers that I just pressed? For example : If I press 91234567 how do I display the pressed numbers?

Can someone help? Thanksz!

---

<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:** [February 4, 2004, 11:46am UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033/2 "2004-02-04T11:46:09Z")

</div>

You can store the pressed numbers in an array by using yourArray.push(number) when pressing the corresponding button. You can then display the values of that array in your textfield using a for loop. 🙂

---

<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:** [February 4, 2004, 12:57pm UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033/3 "2004-02-04T12:57:03Z")

</div>

Woh. That seems to be too tough for me as I’m a beginner with limited action script knowledge. Is there an easier way?

---

<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:** [February 4, 2004, 1:31pm UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033/4 "2004-02-04T13:31:30Z")

</div>

Check the attached fla.

---

<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:** [February 4, 2004, 1:34pm UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033/5 "2004-02-04T13:34:58Z")

</div>

Good solution too. Using arrays is good if you want to control the numbers in any way, but this way is indeed the best if you don’t need control over the inputted numbers 🙂

---

<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:** [February 4, 2004, 2:01pm UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033/6 "2004-02-04T14:01:27Z")

</div>

😉

---

<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:** [February 4, 2004, 2:06pm UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033/7 "2004-02-04T14:06:52Z")

</div>

Thanks Phat7 and Voetsjoeba for the information given!

---

<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:** [February 4, 2004, 2:48pm UTC](https://forum.kirupa.com/t/how-to-display-pressed-numbers/42033/8 "2004-02-04T14:48:54Z")

</div>

You’re welcome 🙂
