Help with code

Does anybody know of a way that I can have the “abcd” --code below-- be anything? meaning I want to modify this code so that if any single letter or number (or series of letters or numbers) entered into the Textbox (input box) will then go to “nameentered” and if nothing is put in the box it will go to namemissing, well it does that part. I just don’t want to have to know exactly what letters they are going to put into the input textbox to try to match.

on (press) {
if (textbox.text.indexOf(“abcd”) != -1) {
_root.gotoAndStop(“nameentered”);
} else {
_root.gotoAndStop(“namemissing”);
}
}

Thanks in advance,

-M

[AS]
on(press){
if(!textbox.length){ // if nothing is typed
_root.gotoAndStop(“namemissing”);
}else{
_root.gotoAndStop(“nameentered”);
}
}
[/AS]

Man, I tell you what…I learn, I learn, I learn. THANKS! I love this stuff.

no problem, glad your enjoying it

one thing…what does the ! represent?

thats the not operator. as in-

if(!textbox.length) is the same as if(textbox.length==false)

It just saves time and energy :slight_smile:

thanks for clearing that up kartik

Way cool! Thanks to both of you.