# Clearing variables

**URL:** <https://forum.kirupa.com/t/clearing-variables/65138>\
**Category:** flash\
**Created:** [September 23, 2004, 9:37am UTC](https://forum.kirupa.com/t/clearing-variables/65138 "2004-09-23T09:37:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlitio](https://avatars.discourse-cdn.com/v4/letter/c/6bbea6/32.png) [@Carlitio](https://forum.kirupa.com/u/Carlitio)\
**Post date:** [September 23, 2004, 9:37am UTC](https://forum.kirupa.com/t/clearing-variables/65138/1 "2004-09-23T09:37:25Z")

</div>

Hi,

I have a form made up in flash, with various input fields. Once the user has entered values, it goes off down the timeline doing various things with them. Thing is, at the end I want a reset button which sends the playhead back to the start so the user can start again afresh. Problem is the values that the variables hold are obviously still displayed in the text box’s from the previous calculations.

How do I clear them, like it’s running anew ??

Thanks in advance if you can help.

---

<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:** [September 23, 2004, 12:31pm UTC](https://forum.kirupa.com/t/clearing-variables/65138/2 "2004-09-23T12:31:57Z")

</div>

> [@Carlitio](#):
>
> Hi,
> 
> I have a form made up in flash, with various input fields. Once the user has entered values, it goes off down the timeline doing various things with them. Thing is, at the end I want a reset button which sends the playhead back to the start so the user can start again afresh. Problem is the values that the variables hold are obviously still displayed in the text box’s from the previous calculations.
> 
> How do I clear them, like it’s running anew ??
> 
> Thanks in advance if you can help.

Hi,

On your reset button your just need to reset values:

resetButton.onRelease = function() {  
firstName.text = “”;  
lastName.text = “”;  
emailId.text = “”;  
…  
};

* * *

aShIsH

Thats…it

---

<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:** [September 23, 2004, 12:59pm UTC](https://forum.kirupa.com/t/clearing-variables/65138/3 "2004-09-23T12:59:09Z")

</div>

! Blatently obvious… but thanks. I just had a mental block because they were integers and not strings and therefore had no quotes to begin with !
