# Will Array Work For Turbo-charged Magic 8-Ball?

**URL:** <https://forum.kirupa.com/t/will-array-work-for-turbo-charged-magic-8-ball/169964>\
**Category:** flash\
**Created:** [November 21, 2005, 5:31pm UTC](https://forum.kirupa.com/t/will-array-work-for-turbo-charged-magic-8-ball/169964 "2005-11-21T17:31:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob\_banks](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@rob\_banks](https://forum.kirupa.com/u/rob_banks)\
**Post date:** [November 21, 2005, 5:31pm UTC](https://forum.kirupa.com/t/will-array-work-for-turbo-charged-magic-8-ball/169964/1 "2005-11-21T17:31:18Z")

</div>

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?
