# Simulating "suggest search"

**URL:** <https://forum.kirupa.com/t/simulating-suggest-search/259754>\
**Category:** Uncategorized\
**Created:** [May 8, 2008, 1:21pm UTC](https://forum.kirupa.com/t/simulating-suggest-search/259754 "2008-05-08T13:21:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamr1001](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@adamr1001](https://forum.kirupa.com/u/adamr1001)\
**Post date:** [May 8, 2008, 1:21pm UTC](https://forum.kirupa.com/t/simulating-suggest-search/259754/1 "2008-05-08T13:21:30Z")

</div>

Hello,

I’d like to simulate Google’s “suggested search”, with basic string checks…

I could really use some help composing the logic in AS3.

Here’s my pseudo code…

create text input box  
create text output box  
create array of searchable items  
add event listener to text input box on object change (?)  
create function to execute on object change  
for each item in the array of searchable items (using var x)  
for each character in the text input box (using var y)  
if character at current idex of item x != current character at index of text string y, next item  
if good, add the to the output list

…Can someone help me (a) finish this logic and (b) write this in AS3?

Thanks!
