Ignore Text Case When Checking Input Box
Hi all,
I have an input box which the user types a set sentence into, they then press the "enter" key at which time flash checks the type and depending upon whether it is correct or not it performs a different function.
How do I get flash to ignore text case.
Here is my code:
on (keyPress "<Enter>") { if (_root.holder.input.addy == "Sam's Australia trip") { _root.gotoAndPlay("email 13_5 proceed"); } else { _root.holder.input.gotoAndStop("wrong"); stopAllSounds(); } }
Say for instance some one types the sentence but forgets to put a cap A on Australia, I want flash to ignore this.
Any help would really be appreciated.
Craig
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-27-2004, 01:50 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Checking Input Text - Case Sensitivity
I am trying to accept some input text and check it against a set value. I need the check to be case insensitive, and I'm not sure the best way to do it.
I could probably set up an array with all variations or something like that, but there's got to be an easier way. Any suggestions?
Thanks!
How To Ignore Case?
Hi
Is there any way in ActionScript to make caseINSENSITIVE comparisons? If yes, please let me know 'how'.
Thanks
Daisy
Searching XML With Flash (ignore Characters Case)
I have checked out this tutorial and have created my own version of this but is there any way of ignoring the character case. i.e if i searched for "happy new year" it would display results including "Happy new year"
Thanks
Jak
Convert Lower-case To Upper-case While Typing In Input Field
Hi,
is it possible to convert lower-case text to upper-case while typing in the input text field? In example: if a user type lower-case text in input text field, the upper-case is used instead. I'm using String class and toUpperCase() method, for converting other text.
Thanks, M :D ario
Case Sensitive Input Text
Hi there...I've created an interactive type-in exercise where the user is asked to type in an s, an o, and a v in order to show parts of a sentence. Rather than use a quiz template, I've used input text fields and an array to check the answers. What I cannot for the life of me figure out is how to make this thing accept both upper and lowercase versions of the letters specified above. Any ideas? I've tried using the ole "S" || "s" thing, but to no avail.
Turn Input Text Into Lower Case
Is there a way to convert the information in the inputName text field, down to lower case before it checks its validity? or a way to disable case sensitivity perhaps?
ActionScript Code:
btn.onRelease = function() { if (inputName == "kirupa", "KIRUPA", "Kirupa") { inputName = "Access granted!"; } else { inputName = "Access denied!"; }}
Eliminating Case Sensitivity For Input Text?
I have a simple movie using an input text box in which a student gets rewarded for entering the correct answer, or asked to "try again" if the answer is wrong. Is there a way to eliminate the case sensitivity of the answer being entered. Students are getting the"try again" prompt for merely not using the correct letter casing.
here is the code I'm using:
on (release, keyPress "<Enter>") {
if (answer=="Carpal Tunnel Syndrome") {
gotoAndStop("right");
} else {
gotoAndStop("wrong");
}
}
Any help would be greatly appreciated!
R61
Checking Value Of Input Text?
Hi folks,
Working on a simple dog and pony show that needs to fake some password entry. I'm in Flash CS3 using AS2.0.
I have an Input Text field named "txt_pinnums" and its line type is set to Password. It has a variable of "pinpassword".
All I want to do when "btn_ok" is pressed is check that the numbers entered on the keypad that are now in the input text field equal "1234". It seems though that the value of that field is a bunch of HTML, not simple characters. Here is what I have:
PHP Code:
stop();txt_pinnums.text = "";function checkPin() { if(pinpassword eq "1234") { trace("good"); } else { trace("bad"); }}btn_ok.onRelease = function() { checkPin();}
I'm sure my AS is not that good, but as I said this is just a simple show and tell demo that will be thrown away. How can I test that the input text equals 1234? If I do a trace(pinpassword) I get a bunch of HTML in addition to the characters entered.
Also, one syntactical question. I tried this:
PHP Code:
btn_ok.onRelease = checkPin;
But that doesn't work... that type of thing works in JS though. Curious as to why it doesn't work.
Checking Text In Input Field
Hello,
I am working on an interactive online application training module using Flash 5.
I have a task which I need to simulate using ActionScript:
1. User types a specific name, e.g. martin (lower or upper case) into an input text field (which sits on a screen grab of a window). The name has a fixed length.
2. The name is validated.
3. If the name was correctly typed, the play-head is advanced to a new frame (with a new screen grab). Else the user needs to try again.
Could someone please help me out with the ActionScript. Your help will be greatly appreciated.
Checking Input Text Parameters
hi!
I've got a problem I'm sure one of you guys would be able to assist me with.
I have an input text field with a button next to it where the user is supposed to enter a number. when he clicks the button another page opens according to the number he entered. I don't want to restrict the input text to numbers only, but I do want some kind of a check to see if he entered a valid number (that is, any number bigger then zero, no letters or special characters). Right now it seems it calculets any character entered as having a numeric value and i wasn't able yet to make it trace an error message of some sort.
Help please...
Thanks
Simply Checking Input Text
Hi friends,
I have simple questions about text checking.
1- I have 4 input text.. When someone write First input, after 4 numbers, i want text cursour jump automaticly 2nd input text.. How i can limit it ? i meant without using mouse or tab button i want visitors write all input texts...
2- How i can check input text with a simple way.. For example forms. they control email adress, if it has "@" or not after clicking submit button.I want it when he/she jump 2nd input text..
thank you for any help
Checking Character Case
hello, say im given a single character, how do i know if its uppercase or lowercase? thanks..
Checking User Input Versus A Text File
My movie starts with user input field and submit button. I am using loadvariables to load a bunch of variables off a text file. these variables are called: valid1 valid2 valid3 etc. These are codes that are valid. THen when the user inputs a code into this input field and hits submit, i need to write a script that checks if what the user just entered is one of the valid variable on the text file we just loaded. They will get a message telling them wether or not the code they entered is valid.
Sounds easy right? I thought so too, then i spent way too many hours on it. Help would be appreciated.
//D
Check User Answer By Checking Input Text Box
how do i check the answer that enter by user....
the marks is given by checking whether they user key in the keywords or not...
i m thinking of using string method...but i not able to do it...
pls help....
Checking Input Text Against Dynamic Text
Hi!
Trying to build a conversion program for children to use in school.
I have created 3 dynamic text boxes and want the child to type in the correct conversion in input box (num4)
How can I press a button to check whether the input is the same as num3? (correct conversion amount).
I thought it might be
if num3 = = num4 i'd get away with it!
Apparantly not.
I have included my flash 5 file for people to have a look at!
Cheers
Chris
Not Case Sensitive Input Of Username?
I have a login section that has a username and password input field. I am not sure if I am doing this right, but since there is only one username and one password, this is how I did this.
function checkPassword(userN:String, passW:String):Void {
if(userN == "collections" && passW == "winter2008"){
//let user proceed
}else{
//error message
}
}
My question now is how can I have the username not be case sensitive. Is that possible?
Thanks a lot for any help!
Not Case Sensitive Input Of Username?
I have a login section that has a username and password input field. I am not sure if I am doing this right, but since there is only one username and one password, this is how I did this.
function checkPassword(userN:String, passW:String):Void {
if(userN == "collections" && passW == "winter2008"){
//let user proceed
}else{
//error message
}
}
My question now is how can I have the username not be case sensitive. Is that possible?
Thanks a lot for any help!
Help In Checking Whether Input Has Decimeal
ok lets say i have a input text box and a submit button
the user must input a number on the textbox and click on the submit button
ok now the question is how to i check wether the number he user enters contains a decimeal which i don't wann..
any one know can please help me
thanks a million in advance.
Randomizing And Checking Input. HELP
I am going to make a memory game in which players have to memorise the arrows (up, down, left, right) coming out one by one and then input the answer in the correct order. I am a beginner in writing flash game and using action script. Here are my problems:
1. How to randomise the arrows and let them coming out from the left to the right (same y position) with a certain speed?
2. How to check the player's input with the randomised arrows?
Thank you very much.
Checking If Input Box Is Empty
on(click) {
if (insc<=0 || insc == undefined) {
info = "Field Invalid";
}else {
getURL("url", "_blank", "POST");
}
}
For some reason this is not working. When I click the button nothing happens. I am missing something? The input box variable name is insc.
Is There A Better Way? Checking User Input To Tex
Surely there must be a better way of checking wether the user has exceeded the amount of chars typed into the textField.
ActionScript Code:
mc1.onEnterFrame = function(){
// Display amount of characters being typed in the textField
charField.text = msgField.length;
}if(charField.text>="255"){
errorTxt.text="Character limit has been reached";
}
Checking User Input
the fla file is here:URL
this is the part of code im interested in
Code:
function ButtonPressed(buttonInstance) {
//if (buttonInstance == futSubmitBtn) {
if (String(noZeroValue)!=undefined && !isNaN(noZeroValue)) {
trace("1st nozero"+noZeroValue);
// get value of date combobox
fmydate = futDateBox.getSelectedItem().data;
//trace("date: "+fmydate);
// get value of month combobox
fmonth = futMonthBox.getSelectedItem().data;
//trace("month: "+fmonth);
// get value of year box
fyear = futYearBox.getSelectedItem().data;
//trace("year: "+fyear);
apValue = fmydate+fmonth+fyear;
trace("apdate="+apValue);
} else {
feedback = "No values returned, Please re-click submit button.";
return;
}
there seems to be a lag. if i put in a legal date, it will trace "1st noZero" = undefined, if i press it again, i will get what im after. The same goes for illegal dates, i have to press the submit button twice before the feedback msg will kick in, please someone tell me what im doing wrong!!!
Checking If An Input Field Is Filled Out?
I hope the title was not too confusing. I made a flash movie based on some instruction i got here before. It is a "feedback form" so that users can send email to me without seeing my email or having to use a mail program. I recently made this form so that they can send their message to different people, so there are three send buttons. however, i guess users get confused and think they have to select a person before sending a message. so sometimes blank email are sent.
I want to check to see if there is any data in the message field before the form sends it, and if they have not entered a message i want it to pop up a window telling them they need to type the message first before sending.
I have 3 input fields: name, email, and message. (only message and name need to be checked)
here is my actionscript:
Frame 1:
redirect = "http://www.mysite.com/email-sent.html";
subject = "Message from my sites form";
stop();
Frame 2:
stop();
A button to send the message (actionscript):
on (release)
{
recipient = "person@mysite.com";
getURL("http://www.mysite.com/cgi/formmail",
"lower", "GET");
}
on (release) {gotoAndPlay(2);}
-------------------
So what it does is, the flash is contained in a HTML frameset, and the lower frame is a frame only 1 pixel tall thatis just there so the cgi formmail has somewhere to send it's confirmation of the mail being sent. However, i didn't want users to see that, so the flash movie just moves to frame 2 where it says "thanks for sending us a message (name of sender)".
so, somehow with the button onRelease code i need to check and make sure those fields are filled out, and give a message and halt the message sending if they are not. i guess i need some kind of IF, THEN, ELSE, statement but I'm not very good with writing code, so if anyone can help me i'd really appreciate it. thanks.
Checking / Validating Input Fields
I did perform a search to see if this was already covered but nothing seemed to match so:...
I want to validate an input field for an email address so I'd like to check ig the input text contains the string "@" I guess...
does anyone know how'd I'd do this?
As always thanks heaps!
SS
Is There A Better Way? Checking User Input To TextField
Surely there must be a better way of checking wether the user has exceeded the amount of chars typed into the textField.
code:
mc1.onEnterFrame = function(){
// Display amount of characters being typed in the textField
charField.text = msgField.length;
}if(charField.text>="255"){
errorTxt.text="Character limit has been reached";
}
Quick Input Box Checking Question
I have two input fields and once they both have characters in them I want the movie to jump to another frame. I have this code.
if (name == "") {
gotoAndPlay ("loop");
} else {
if (password == "") {
gotoAndPlay("loop") ;
} else {
gotoAndPlay("connect") ;
}
}
why doesn't it work. I think it is something simple. I want it to check both fields and didn't know if this was the way to go about that. THanks
[F8] Checking Input Values Are Correct
Hey, I'm wondering if anybody has ever come across code that check's whether the value inputted is a valid, in the way that its formatted so for instance with actionscript could flash recognize that
sillymonk@yahoo.com = correct
silly.@!.com = incorrect
I'm not to sure how I would go about coding this? if any body has a suggestion i'd appreciated it.
Checking Cursor In Input Textfield
Hallo everybody,
I have got an question. I made a search input textfield in my flashmenu. it works and the results are being post through php in two frames below my menu. now I want that the searchfield also works with enter. that isn't a problem, but I want that the enter wont work when the textfield is not active. My idea was to make it like this
on(release, keypress "<Enter>") (
if (?????) (
)
getUrl(...............)
)
My question is, what is the condition and how can I check if the cursor is in my input textfield?????
Checking For Empty Textfield Input
I would like to know if it is possible to check if the input textfield is empty or a user has put in some text.
Can this be done? How should I do it?
Is it something like this?
my_txt.text = null;
Checking Input Feilds For Information
I want to check my input feild to make sure that information was put into it.
This is what I have for the Variable name "Name"
if(firstname !=""){
loadVariables ("form.php", this, "POST");
}else{ . . .
Any help?....
Advanced Checking User Input Against An Array Help
advanced checking user input against an array help
im working on a form that has four input text fields and a submit button, and when the user submits his answers, these need to be checked against a set of values stored in an array. standard validation seems to be easy, where the first choice is verified against the first answer, and so on, but i've gotten stuck as the answers can be entered in any order, and while there are only four correct answers, there are more than four acceptable answers.
say this is the array
answers = ["math","physics","chem","chemistry","computer","co mputers","computer science"]
now there are four input boxes where the user has to enter his answers. i know that there are only four correct answers in total (math, physics, chemistry & computer science) but other acceptable answers are also available, since the user might input chem or chemistry, or maybe copmuter, computers or computer science
the four input text fields are answer1_txt, answer2_txt, answer3_txt & answer4_txt. how can i verify the input answers against the array ensuring that all four answers are correct without any duplication of answers (that is, someone enters math, physics, chem & chemistry - this will verify as all correct with standard checking)
any help would be greatly appreciated
sidrao
Urgent: Checking Values Of Input Boxes
Hi everyone,
I need a hand with configuring some input box tasks...I don't think they're too complicated - but I've only just started ActionScripting so I don't know how to go about it.
I'm trying to set up a Flash movie that is an interactive story. The user enters some character names of their choice, and those names are used throughout the movie where appropriate.
First question:
How can I run a check that the user has not entered any profanities (that is, run a check against a pre-defined list of words) and then either call up an alert, or just not allow the user to continue until it is deleted?
Second question:
How can I set it so that, if a user leaves one or more of the input boxes blank, then a default value is used throughout movie? e.g. The author might define the princess's default name as Aurora. If the user leaves the Princess input box blank, then Aurora will be used. But if the user does enter a name, then it might be, say, Emily.
Third question:
What is the best way to carry these values between scenes? Would it work to have a 'submit' button that has a 'gotoAndPlay/Stop' function, and then on that frame, have a
inputBoxName = "";
code?
Does that work when spanning different scenes?
Thanks heaps. All help is much appreciated.
-Grace
Checking Input Box Data For Specific Phrases
Checking input box data for specific phrases
Hi,
I'm new here. I'm developing a diet checker that users enter their recipe into an input field and compares it to an external text file with a list variables of ingredients and then underlines or highlights certain ingredients that would not be good to eat.
Here's the problem:
I need to check this input box for certain words and see if there are specific words before or after those words.
--
Example of what the code needs to do:
The word "egg" WOULD BE highlighted/underlined as a bad ingredient but "egg white" would NOT have the "egg" part highlighted
The word "fried chicken" WOULD BE highlighted/underlined but "baked chicken" or "broiled chicken" would NOT be highlighted
--
The external variable text file lists the words I'm searching for and the words to replace them with but, the code I have cannot yet determine if the word "white" is after the word "egg" and then not have the "egg" part of the phrase underlined.
Hope I made this clear. I'd appreciate any help on this.
Thanks!
Checking User Input To Limit To Certain Digits
I'm doing a simple binary converter where I want only the digits 1 and 0 input into a box.
Everything works great except I need to check the string (from the input text box) to make sure it's only 1's and 0's. The check is performed when they click on the convert button.
I can do this in other languages using regular expressions, which ActionScript doesn't seem to have, so what's the best way to check user input to limit it to specific characters?
Keep in mind the string can be up to 40 characters long, so manually checking each digit would probably be inefficient.
Do I need to use substring for this?
Thanks.
John
Checking Input Box Data For Specific Phrases
Hi.I'm new here. I'm developing a diet checker that users enter their recipe into an input field and compares it to an external text file with a list variables of ingredients and then underlines or highlights certain ingredients that would not be good to eat.
Here's the problem:
I need to check this input box for certain words and see if there are specific words before or after those words.
--
Example of what the code needs to do:
The word "egg" WOULD BE highlighted/underlined as a bad ingredient but "egg white" would NOT have the "egg" part highlighted
The word "fried chicken" WOULD BE highlighted/underlined but "baked chicken" or "broiled chicken" would NOT be highlighted
--
The external variable text file lists the words I'm searching for and the words to replace them with but, the code I have cannot yet determine if the word "white" is after the word "egg" and then not have the "egg" part of the phrase underlined.
Hope I made this clear. I'd appreciate any help on this.
Thanks!
Checking Input Box Data For Specific Phrases
Hi. I'm new here. I'm developing a diet checker that users enter their recipe into an input field and compares it to an external text file with a list variables of ingredients and then underlines or highlights certain ingredients that would not be good to eat.
Here's the problem:
I need to check this input box for certain words and see if there are specific words before or after those words.
--
Example of what the code needs to do:
The word "egg" WOULD BE highlighted/underlined as a bad ingredient but "egg white" would NOT have the "egg" part highlighted
The word "fried chicken" WOULD BE highlighted/underlined but "baked chicken" or "broiled chicken" would NOT be highlighted
--
The external variable text file lists the words I'm searching for and the words to replace them with but, the code I have cannot yet determine if the word "white" is after the word "egg" and then not have the "egg" part of the phrase underlined.
Hope I made this clear. I'd appreciate any help on this.
Thanks!
Making A Text Field Ignore The Cursor
I am creating a dynamic text field in the IDE and putting it on top of a simple one-color square movie clip. I've attached a listener to the movie clip in AS 3, to make it act like a big button. However, since the text field is on top, it blocks the button from reading the cursor, within the text field. I set "selectable" to false in the IDE, on the text field, but that didn't seem to work. Any ideas? Do I have to add a listener to the text field, also? Is that possible? Thanks.
How To Know If A Letter Is Upper Case Of Lower Case
Hi,
I am trying to extract letters from a string and I want to know if a letter is lower case or higher case.
for sure I can do something like:
Code:
var i:String = "L"
var j:String = i;
i.toLowercase();
if(i == j){trace("i is Lower case");}else{trace("i is Higher case");}
.
But I feel guilty while using this code...
I am pretty sure I can do something with the 16 bit code work that String.charCodeAt() gives... but what?!?!? (Do I look like someone who dont know s..t about ascii!?)
Most probably capital letter and small letter are one after the other or so but what order and what code to use to put the code back to letters?
thank you!
Upper Case Lower Case Problem
Ok I have a line in my actionscript that goes like this:
mySnd.loadSound("http://www.blahblah.com/mp3/mp3up/" + _root.user + ".mp3" ,true)
_root.user is given to it via url var.
If the file name that wants to be played is Mike and _root.user is mike it wont play the file, but if i rename the mp3 to mike.mp3 it works.
I want it to play the file regardless of case... how can I do this?
INPUT TEXT - How To Restrict Number Of Lines Of Text A User Can Input Into Textbox
In a flash form I've created I have a input textbox. I don't want the user to be able to input more than 7 lines of text. Is this possible to do? I know that I can set a value for 'max char', but this is not useful for me -- it's essential that the user cannot input more than 7 lines of text.
How can I limit the number of lines a user can input into a textbox?
Thanks!
Glenn
How Can I Scroll My Text In This Case?
Hi all,
I have two problems and hope I can get some feedback on them.
The first one is preloading, i haven't been able to put a preloader in my site (seems i can do wonders in 3d but with simple things I freeze).
Secondly, I need help with scrolling text. I have been limiting myself in the amount of text I include in my site only because I can't seem to get the concept of scrolling text...
any suggestions ?/
amorphica.com
Lower Case Text
hey, how can I convert the text the user inputs into lower case?
The Case Of The Disappearing Dynamic Text
I'm working on a sub-movie to load into my larger main window, and my dynamic text is disappearing. I'm setting it based on the position ("target") of a "cursor" that tracks over a small version of a larger collage of images. The cursor controls the x/y pos of a larger image masked on this sub-movie. This sub-movie loads beneath yet another mask in the main windowing movie. The text is _root level in the sub-movie. It shows up fine when I run the sub-movie alone, but if I load it, the text disappears. Curiously enough, the cursor turns to an I over where it SHOULD be. I'm loading the text out of a multidimensional array contained within the cursor object (_root.cursor). Are there any known issues with dynamic text, masks, and the like? Any settings I should try? Thanks in advance!
Coverting Text To Lower Case
Simple question: I'm trying to convert a user's input variable labeled "input" into all a lower case variable labeled "inputlowercase". Here's the script I'm trying but nothing's happening. What am I doing wrong?
on (release) {
var inputlowercase = input.text.toLowerCase();
}
Thanks.
How To Apply Dynamic Text, In This Case?..
Last edited by arn : 2005-07-14 at 08:42.
hello everybody!
I've made a movieclip containing a dynamic textfield with "Var" called:
varTexte2
and one Action layer containing this actionscript:
varTexte = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum just test text.";
this.i = 0;
this.onEnterFrame = function() {
var _l1 = this;
_l1.i = _l1.i+4;
if (_l1.i<=varTexte.length/3) {
varTexte2 = new String(varTexte.substr(0, _l1.i)+chr(random(80)+21)+chr(random(80)+21)+chr(random(80)+21)+chr(random(80)+21)+" "+varTexte.substring(varTexte.length/3, varTexte.length-2*varTexte.length/3+_l1.i)+chr(random(150)+21)+chr(random(98)+21)+chr(random(150)+21)+chr(random(98)+21)+" "+varTexte.substring(2*(varTexte.length/3), varTexte.length-varTexte.length/3+_l1.i)+chr(random(150)+21)+chr(random(98)+21)+chr(random(150)+21)+chr(random(98)+21));
} else {
varTexte2 = varTexte;
// end if
_l1.onEnterFrame = null;
}
// end if
};
How can I get the same text effect while loading the text from an external .txt file?
Thanks for you efforts!
Best,
Arn
http://www.electronicnature.com
RESTRICTING TO UPPER CASE TEXT + LIST BOX PROBLEM
I'm starting to get annoyed now...
I've got a few text boxes address1, address2 etc which I've restricted using
address1.restrict = "A-Z 0-9";
All seems well if you input your address manually, but also there is an automatic feature on the web catalogue I'm working on, where you can enter your postcode and the relavent addresses will be generated in a scrollable list box. You can select an entry from this list box and click OK to confirm this is your address, which will then conveniently fill in all your address1, address2 etc input text fields.
BUT...
When the addresses are generated in the list box they are not displayed in caps for example 92 Green Lane, Moston, Manchester. Like this... and so when you confirm your address each text box is filled in the same case, NOT in UPPERCASE like I've specified. Anyway to correct this once it passes the address variables into the text fields?
Anyone got any ideas?
|