# How to erase a character in a variable?

**URL:** <https://forum.kirupa.com/t/how-to-erase-a-character-in-a-variable/92375>\
**Category:** Uncategorized\
**Created:** [October 16, 2003, 12:15pm UTC](https://forum.kirupa.com/t/how-to-erase-a-character-in-a-variable/92375 "2003-10-16T12:15:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tipsko](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@Tipsko](https://forum.kirupa.com/u/Tipsko)\
**Post date:** [October 16, 2003, 12:15pm UTC](https://forum.kirupa.com/t/how-to-erase-a-character-in-a-variable/92375/1 "2003-10-16T12:15:46Z")

</div>

Hey,

You are such a great help to me! If I can answer any questions I will!

I have again a small problem. I’ve got a dynamic textbox “name” and simulated a keyboard in flash. If you click on the button which says A the action will be:

on(release){  
name=name+“A”;  
}

The problem is that I want such a button simulation for backspace, so the last key pressed wil be erased. I want to keep it simple and don’t want to use arrays. (though it isn’t that hard ;)) I know that the keycode for backspace is 8 but if I use it an eight will be added to the variable.

Please help me out 🙂  
Thanks in advance,  
Tipsko
