-
With the input setting,
if I let the user input the name, can I avoid user input any symbol or the length of the name no more than 10 character in Flash?
-
Code:
name_txt.restrict = "a-z A-Z";
name_txt.maxChars = 10;
Where name_txt is the instancename of the textfield.
/Mirandir
-
**Error** Scene=Scene 1, layer=Actions, frame=10:Line 2: Left side of assignment operator must be variable or property.
if (inputName.restrict = "a-z A-Z" && inputName.maxChars = 10{
Total ActionScript Errors: 1 Reported Errors: 1
What happens? How do we do with "if" statement?
-
-
You should write code as I presentedf it. You do not need to use an if-statement. thoose two lines of code will force the user to only use letters , no numbers or special chars, only letters. And a maximum 10 letters are allowed to be filled in.
However that code will only allow a to z so if it is to be used with a certain language's special chars like å, ä and ö (swedish) they have to be added to the string.
/Mirandir
-
But how can I present if the user do something wrong. I dont have to give him feedback to let him know?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|