Hmm.. I need some help with a function reading a "password"?

Hello! I just started learning flash and actions and stuff so to practice I’m making this little totally random game of a guy that starts playing a guitar and then goes to the space and weird stuff >< haha, anyway!

There is this part where there is a door which will only open if you prove that you’ve lost, and there’s a wall with a “imput text” form where you can write and do graffiti, and I want to make it so that if you write “The Game” anywhere on that wall, you will get certain +1 value…

I’ve made something to practice that works kind of like that…

stop();
graffiti.addEventListener(MouseEvent.CLICK, showStringInfo);

function showStringInfo(Event:MouseEvent):void {
var myString:String = theText_txt.text;
var win:String = “Win”
var graffitipass: Number = 0;

if(myString==win)
{
    gotoAndStop(2);
    graffitypass=1;

}

}

So that works with a button, but the thing is that I want to be so that it doesn’t matter weather it is in caps or not, so it would accept “the game” “THE GAME” “ThE GaMe” etc… And also I want it to be so that it doesn’t matter if there’s any other text in the box… And if it would work without a button it’d be even better…
So I think that it could make a search for the words “the game” and if the search returns true the it would active the if statement…

Also if it can’t be done without a button or anything like that, that’s okay. :stuck_out_tongue:

Thanks :slight_smile: