Hi,
In the following code the if statement work where as else doesnt take Should I need to add text input for displaying else message.
If a user type small caps it should show the message which is in the else statement but even if i type the small caps its showing the message of if statement.
on (press) {
var texta = name.text;
if (texta.restrict = “A-Z 0-9”) {
message.text = “sorry! caps and num not allowed”;
cirlcea.gotoAndStop(“red”);
}
else {
message.text = “ur name is” +texta;
cirlcea.gotoAndStop(“green”);
}
}
Regards
Vaidyanath