?
Solved

Text field with condition in Adobe Flash

Posted on 2012-08-25
3
Medium Priority
?
376 Views
Last Modified: 2012-10-14
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.
0
Comment
Question by:kenazor
2 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 600 total points
ID: 38375040
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
 
LVL 37

Expert Comment

by:CyanBlue
ID: 38494341
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question