Forcing ALL CAPS in an input text box

I’m creating a flash-based login prompt for user name and password and I want to force the user names to be all caps. Is there a simple way to get this accomplished?

Thanks,

James

[AS]myTextField.restrict = “A-Z”;
// another option
myTextField.restrict = “^a-z”;[/AS]
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary762.html

:wink:

or

myTextField = myTextField.toUpperCase();

You’ll need an onChanged handler to get that code to work properly…
[AS]myTextField.onChanged = function() {
this.text = this.text.toUpperCase();
};[/AS]