I have this project to do, and I'm trying to make a typing
tutor game...Can anyone tell me a way to make it so that when a
word in a field is typed, some thing happens eg. A bomb falling
from the sky has a word on it, when you type the word, the bomb
explodes. Can anyone help me?
Assuming the simplified case that user is typing into the end
field, and has not moved insert point to somewhere in the
attach this to the field or text sprite.
on keyUp me
wordsList ["cat", "dog", "orangatang", "elephant"]
w = getPos(wordsList, the last word of
if w then -- no match gives zero
--- call your animate action passing wordsList[w]
-- this might do as a controled concept demo.
-- problems include getPos being case sensitive, an on
could convert typed upper case to lower case to make entries
wordsList. After a word has been completed the next keyUp
space) will still math the last word of the field to the word
could add test for last char = space or return.