# AS3 search engine help :\[

**URL:** <https://forum.kirupa.com/t/as3-search-engine-help/316902>\
**Category:** flash\
**Created:** [December 5, 2010, 8:14pm UTC](https://forum.kirupa.com/t/as3-search-engine-help/316902 "2010-12-05T20:14:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iLurk](https://avatars.discourse-cdn.com/v4/letter/i/b5e925/32.png) [@iLurk](https://forum.kirupa.com/u/iLurk)\
**Post date:** [December 5, 2010, 8:14pm UTC](https://forum.kirupa.com/t/as3-search-engine-help/316902/1 "2010-12-05T20:14:00Z")

</div>

Hey Kirupa,

I have the feeling that I’m really missing something simple here, but I’m fresh out of ideas on how to fix the problem I’m dealing with right now.  
For this flash project I have a search engine that searches a XML database. This part I finally got working, but what I haven’t managed to get to work yet is implement it with an input text field.

```auto
Search_Button.addEventListener(MouseEvent.MOUSE_DOWN,SearchEvent);
function SearchEvent(event:MouseEvent) {
    if (Input_TXT.text.length < 3){
        Output_TXT.text = "Please use a search term with 3 or more characters.";
        return (0);
    }
    else if (Input_TXT.text.length >= 3){
        var search : XMLList = myXML..ITEM.(TAGS.indexOf("boo") > -1);
        Output_TXT.text = (search.NAME.text().toXMLString());
    }
}

```

What’s going on here is that if I type in more than 3 characters in the input text field, _regardless of what I type_, I get the search results for “boo” back. What I want is a way to put whatever I type in Input\_TXT between those “”'s, but I have no idea how to pull that off. I’ve already tried to put Input\_TXT in there, I’ve tried with Strings, variables, etc.

I’m out of ideas right now, and I hope someone can help me.

(Also, obviously I’m a bit new to AS3.)
