• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

clearing text input fields

Participant ,
Aug 14, 2007 Aug 14, 2007

Copy link to clipboard

Copied

I am working on a game in flash. at the end of the game you can enter your name, address etc. and your name will apeear in the high score list. Also an email will be sent with this info.

Everything works fine with one exception: if you play the game and enter your data, then click on new game and play the game again, when you get to the screen at the end to enter your name etc. you can still see the old info you entered the first time.

So my question is: how can I clear the data from text input fields in flash?

Thanks in advance for any and all help!
TOPICS
ActionScript

Views

404

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Aug 14, 2007 Aug 14, 2007

Copy link to clipboard

Copied

newgameBtn.onRelease = function(){
inputField_txt.text = "";
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 15, 2007 Aug 15, 2007

Copy link to clipboard

Copied

quote:

Originally posted by: dzedward
newgameBtn.onRelease = function(){
inputField_txt.text = "";
}


thanks for your quick help! unfortunately it doesn't work - all fields are still filled with text ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 15, 2007 Aug 15, 2007

Copy link to clipboard

Copied

roadcrew.

ensure that inputField_txt = the instance name of the text field you wish to clear, for example myTextField.text=""; or textFieldOne.text=""; where the instance names of the text fields are myTextField abd textFieldOne respectivly.

Barry.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 15, 2007 Aug 15, 2007

Copy link to clipboard

Copied

quote:

Originally posted by: ++ Barry ++
roadcrew.

ensure that inputField_txt = the instance name of the text field you wish to clear, for example myTextField.text=""; or textFieldOne.text=""; where the instance names of the text fields are myTextField abd textFieldOne respectivly.

Barry.


Yo I did that already. Is it important that the Button to clear the text and the text fields are all on the same frame in the timeline? When a person enters his info and clicks on submit the timeline goes to the next frame and displays a message. And here on this frame is the button to where this code would be.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 21, 2007 Aug 21, 2007

Copy link to clipboard

Copied

LATEST
roadcrew
I use it and it worked... but not on the first try :)

make sure the hierarchy is proper


Thanks dzedward

Best of luck Roadcrew


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines