# Dynamic Text, delete numbers using btn

**URL:** <https://forum.kirupa.com/t/dynamic-text-delete-numbers-using-btn/259277>\
**Category:** flash\
**Created:** [May 2, 2008, 6:37pm UTC](https://forum.kirupa.com/t/dynamic-text-delete-numbers-using-btn/259277 "2008-05-02T18:37:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![susred](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@susred](https://forum.kirupa.com/u/susred)\
**Post date:** [May 2, 2008, 6:37pm UTC](https://forum.kirupa.com/t/dynamic-text-delete-numbers-using-btn/259277/1 "2008-05-02T18:37:04Z")

</div>

Hello!

I’m working on a project where the user has to enter in a game code. I have it set up as a number pad (similar to phone) so when the user clicks on “1” a 1 is typed into the dynamic text box.

I have a button on the bottom for “CLEAR” which clears out everything they’ve typed (max. characters 5)

I’m trying to figure out a way for a “back” btn to work which would just delete one number at a time on(release){…

Here is the code that has the clear button working:

on (release) {  
\_root.gameCodetxt = \_root.gameCodetxt.length ="";

}

Any ideas???
