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

Change a characters in a text

Contributor ,
Oct 13, 2014 Oct 13, 2014

I need to change a character at a time, with buttons, in a text, for example:

abcdefg

With button 1) change only the letter "a" but not the other letters;

With button 2) change only the letter "b" but not the other letters;

etc.

I have seen several methods that are not in my case.

I would like some advice to know, except obviously  the script of buttons, what is the easiest method to solve this problem.

Thanks.

TOPICS
ActionScript
353
Translate
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

correct answers 1 Correct answer

LEGEND , Oct 13, 2014 Oct 13, 2014

You can look into using the String.replace() method.  Another option is to just use String.split(remove_letter).join(replacement);

Translate
LEGEND ,
Oct 13, 2014 Oct 13, 2014

You can look into using the String.replace() method.  Another option is to just use String.split(remove_letter).join(replacement);

Translate
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
Contributor ,
Oct 14, 2014 Oct 14, 2014

Thank you Ned, you helped me find the solution! 

Translate
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
LEGEND ,
Oct 14, 2014 Oct 14, 2014
LATEST

You're welcome Jhon

Translate
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