Text field with condition in Adobe Flash

Hi,

I need to code a simple piece of script in Adobe Flash which detects user input in a text field (single line), compares it with words in a list (14 words in total), and if there is a match it will reveal a single letter associated with that word. It's a kind of word game.

You can see the user interface in this file (Flash CS5): https://dl.dropbox.com/u/1399546/sample-word.fla

Some sample words:
SUN = letter Y
MOON = letter N
SCHOOL = letter T
etc.

Thanks.
kenazorAsked:
Who is Participating?
 
blue-genieConnect With a Mentor Commented:
The easiest thing to do would be use an event listener and check the change event to see what is typed into your text field. This is assuming you're not just using a button in which case just use a click event.

Then store the answers and the associated answer in 2 separate arrays. Use a for loop to loop through and check the text field contents, when you have a match break out of the for loop, get the current index in your loop and pull the answer out of the other array and display it.
0
 
CyanBlueCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.