AS3 search engine help :[

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.

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.)