Skip to main content
Known Participant
May 4, 2010
Answered

user inputted text: determining if a specific character is correct

  • May 4, 2010
  • 1 reply
  • 395 views

Hello!

I'm creating a learning activity for one of our biology classes. The basis of the activity is to test students ability to transcribe and translate DNA into other sequences.

I have a dynamic text field where the student would type in a 36 character squence.

I already know that I can use an if statement to see if all 36 characters are correct. I was wondering if there was a way to individually check each letter the student typed in is the correct one for that line. So if UUAACCGG is the correct answer, I want flash to check and see if the third character is indeed A or not.

I know I can do this with 36 individual text boxes, but I was kind of hoping to get away with just one big text box.

Is this possible? If it is, where do I start?

This topic has been closed for replies.
Correct answer Ned Murphy

Look into the String class and its charAt() method.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
May 4, 2010

Look into the String class and its charAt() method.