I’ve been Googling and Googling and haven’t been able to find this answer, so I’ll try here. I’m building a ‘Magic 8(Golf)-Ball’ for a golf site. Rather than just having the Golf-Ball give pat answers like ‘Doubtful’ and ‘Maybe,’ I want to give ‘smart’ answers. For unstance, if the question is ‘Will Tiger Woods win the Masters,’ I want the Golf-Ball to say, ‘Tiger Woods will loose to Michelle Wie by three strokes.’ I can use the ‘switch’ actionscript, but then I have to put thousands of questions in so that the questions match exactly, even down to capitalization.
Is there a way to recognize keywords with the array function and answer the question based on the keywords? That way, no matter where ‘Tiger,’ ‘Woods’ and Masters fit in the question, I can provide the same answer?