This content has been marked as final. Show 8 replies
it's possible but it's (usually) a lot of work if you have a lot of words that you want to include in your array.
Yikes! I have about 50 words. Maybe I'll go another route. Thanks!
50's not that many. you'll need to type all 50 and assign to an array.
Oh, ok... well, I already have the items in an array since I was searching them. Do I use charAt? and onChanged to accomplish this? I can probably figure that much out but what I don't know how to do is handle duplicates? This is an array of first names.
for auto complete you probably want to use indexOf() and utilize the user's text input as the paramenter in indexOf(). you'll loop through your array and display the first match. you'll probably want to use the Selection class to highlight it so if the user keeps typing the match is replaced.
I have done something similar a while ago (code might be a bit old-fashioned) if you are still interested I might be able to dig it out from some archive.
just let me know
Sure, but don't kill yourself finding it. :)
I'm just curious to see how you did it.
It only cost me an arm and a leg, so no worries about killing myself :-)
Actually it is Flash 5 (!) and I hat to translate at least the core comments into English, but I hope you don't mind a lot of typos.
It is a search-box that finds towns in southern Germany provided by a list in a text file. it reacts after you have put in the second character and (tattatatta) you can find it : here.
Have fun with code from the past - and from some beginner that I was back then.