See Related Forum Messages: Follow the Links Below to View Complete Thread
Uppercase
How do convert what user type to uppercase???
Uppercase
How do convert what user type to uppercase???
Convert To Uppercase
does anyone know the ation script to conver a string to upper case
Thanks
Gareth
Uppercase Command?
Hi...
Was wondering if anyone if there is a command for turning a variable to uppercase when displayed?
Thanks for any help....
Cam.
SIFR - Uppercase
Ok I have just built a website using sIFR for the first time, it is great but there is one issue I have faced implementing it.
My site design requires uppercase titles, this obviously can't be done yet soley through sIFR as flash will not support converting to uppercase using css: text-transform:uppercase; It is really important for me in my html to be able to mark up my titles in 'title case' for accessability reasons, I just need it to display in uppercase for sighted users.
So now you get the gist of my problem here, my question is really; is there a way that I can use str.toUpperCase(); on a dynamic text field in my action script to convert to upper case that way?
Any help would be great
Thanks
[F8] First Letter MUST Be Uppercase
Hi there!
Nowadays trend is to write everything in lowercase. Last Names, First Names, City Names, etc...
Maybe the use of computers is one of the reasons to such bad typing.
In a form, there's a lot of Input Fields to fill-in...
Is there a way in AS to make the first letter typed in an uppercase one?
I thank you in advance for the help you'll provide.
Best regards,
Gerry
Lower- Te Uppercase
Hey,
I want convert a string from lower to uppercase, I did it like this:
ActionScript Code:
myString_str ="String";
item.myItem.text = myString_str.split("b").join("B");
item.myItem.text = myString_str.split("c").join("C");
item.myItem.text = myString_str.split("d").join("D");
item.myItem.text = myString_str.split("e").join("E");
item.myItem.text = myString_str.split("f").join("F");
item.myItem.text = myString_str.split("g").join("G");
item.myItem.text = myString_str.split("h").join("H");
item.myItem.text = myString_str.split("i").join("I");
item.myItem.text = myString_str.split("j").join("J");
item.myItem.text = myString_str.split("k").join("K");
item.myItem.text = myString_str.split("l").join("L");
item.myItem.text = myString_str.split("m").join("M");
item.myItem.text = myString_str.split("n").join("N");
item.myItem.text = myString_str.split("o").join("O");
item.myItem.text = myString_str.split("p").join("P");
item.myItem.text = myString_str.split("q").join("Q");
item.myItem.text = myString_str.split("r").join("R");
item.myItem.text = myString_str.split("s").join("S");
item.myItem.text = myString_str.split("t").join("T");
item.myItem.text = myString_str.split("u").join("U");
item.myItem.text = myString_str.split("v").join("V");
item.myItem.text = myString_str.split("w").join("W");
item.myItem.text = myString_str.split("x").join("X");
item.myItem.text = myString_str.split("y").join("Y");
item.myItem.text = myString_str.split("z").join("Z");
But that dont work.
First Letter MUST Be Uppercase
Hi there!
Nowadays trend is to write everything in lowercase. Last Names, First Names, City Names, etc...
Maybe the use of computers is one of the reasons to such bad typing.
In a form, there's a lot of Input Fields to fill-in...
Is there a way in AS to make the first letter typed in an uppercase one?
I thank you in advance for the help you'll provide.
Best regards,
Gerry
Selective To UpperCase()
Hi,
After "googling" without success, could some provide a URL or code sample that would illustrate how to output the following:
"This Is Not A Love Song"
Where the first letter of each word is capitalized.
Code:
//
var words:Array = new Array();
var sentence:String = " ";
//
function fillArray() {
words = arguments;
// arguments is an array
// arguments[i] is undefined
var len:Number = arguments.length;
for (var i:Number = 0; i<len; i++) {
//trace("argument "+i+" is: "+arguments[i]);
}
formatArray(words);
}
//
fillArray("This", "is", "not", "a", "love", "song");
//
function formatArray(w:Array) {
var sentence:String = "";
for (var i:Number = 0; i<w.length; i++) {
sentence += w[i];
sentence += (i<w.length-1) ? " " : ".";
}
trace(sentence.toUpperCase());
}
KeyPress - Uppercase V Lowercase ?
I've got a series of lowercase keyPress's that play a sound from a frame within a MC. Easy.
The problem however, is that when i use an Uppercse keyPress, it plays the sound from it's frame 'and' the sound that should only play when the lowercase Key is pressed. I want sound in frame "a1" to play only, when key "a" is pressed, and the sound in frame "a2" to play only when key "A" is pressed.
Hope someone can help.
Here's the script:
on (keyPress "a") {
_root.sounds.gotoAndStop("a1");
}
on (keyPress "A") {
_root.sounds.gotoAndStop("a2");
}
::bluemoth
Changing Variable To Uppercase
is there a way to convert a variable's characters to uppercase, once it has been defined through an input text field? ("Guest" -> "GUEST")
Uppercase And Lowercase Error
Inputscene41displaytemp = inputscene41.toLowerCase();
Above line uses lowercase to get value from text box but i want the answer to be accepted by both upper and lowercase.How do i write to get program accept by both cases.
Thanx
Making Text Uppercase
I know that you can make text lower case using .toLowerCase() but I want to make some text upper case, how can I do this, all I need is the command please - unless there is somthing more complicated.
(I am using actionscript 2.0)
Thanx,
Determining Uppercase And Lowercase
i have to create something that loads text dynamically and then you can input words and it determines if that word is in that dynamically loaded text. I have to output a statement for three different reasons.
1. If the word is not found
2. If the word is found
3. If the word is found, but it's not the same (Ex. You enter hello but the word in the text is Hello)
I have it all working for the moment using functions etc....but the one thing I am unsure about is how to determine whether the character is uppercase or lowercase or maybe there is another possible way so that I can print out the 3rd reason from about.(telling the difference from hello and Hello.)
The whole thing is based off a tutorial I found here: http://www.kirupa.com/developer/acti...elect_text.htm
just got rid of the find next button and added an output msg box.
Any help or guidance in how to fix this would be greatly appreciated!
Input Text To Uppercase
Is there a way to have an input text field so that no matter what the user types in it always appears in uppercase?
Forcing Input Txt To UPPERCASE
Hi all,
say I've got an input field and I want the entries to be UPPERCASE, how can I set this up in flash so that these characters appear capitalized even if the user doesn't have CAPSLOCK on?
I've tried myTextField.toUpperCase(); but this doesn't work. Anyone got any ideas?
Determining Uppercase And Lowercase
i have to create something that loads text dynamically and then you can input words and it determines if that word is in that dynamically loaded text. I have to output a statement for three different reasons.
1. If the word is not found
2. If the word is found
3. If the word is found, but it's not the same (Ex. You enter hello but the word in the text is Hello)
I have it all working for the moment using functions etc....but the one thing I am unsure about is how to determine whether the character is uppercase or lowercase or maybe there is another possible way so that I can print out the 3rd reason from about.(telling the difference from hello and Hello.)
The whole thing is based off a tutorial I found here: http://www.kirupa.com/developer/acti...elect_text.htm
just got rid of the find next button and added an output msg box.
Any help or guidance in how to fix this would be greatly appreciated!
Forcing Input Txt To UPPERCASE
Hi all,
say I've got an input field and I want the entries to be UPPERCASE, how can I set this up in flash so that these characters appear capitalized even if the user doesn't have CAPSLOCK on?
I've tried myTextField.toUpperCase(); but this doesn't work. Anyone got any ideas?
Input TextField, Keep Uppercase
I have an input textfield and I'm embedding a font to make it look all purty.
I only want to embed uppercase to save some KB's.
Obviously if they were to type lowercase, nothing would show up. Is my only option to go this route to use the onChanged handler and call toUpperCase().
If it matters, I'm publishing to F7.
Have people tried this? Success, no success? Calling onChanged to time-intensive? Just wanted to see if people had experience doing anything like this.
Converting First Letter In String To Uppercase
I have a input text field and when someone enters in a word, I want the word to be displayed in a dynamic text field and have the first letter uppercase. I know how to make the whole string uppercase, I'm just a little confused on how to just target the first letter though.
Thanks in advance..
jiffy loop
Passing Data And Converting To Uppercase
Hi
I'm sorry if this is posted in the wrong area. Here's my issue:
I'm transfering some data from the html code very simply like this:
<param name="movie" value="title.swf?title=This Title" />
And then in the flash i have my dynamic textbox with the variable 'title'. It all works fine, and it's being displayed nicely.
However, the issue is that i would like this text to be UPPERCASE'd.
In the flash help file i found this:
String.toUpperCase()
Availability
Flash Player 5.
Usage
my_str.toUpperCase()
Parameters
None.
Returns
A string.
Description
Method; returns a copy of the String object, with all of the lowercase characters converted to uppercase. The original value is unchanged.
.. but i'm not sure of how i can make it work. Anyone?
Switching String To Lowercase/uppercase ?
I haven't touched Flash-MX in a long time and I can't remember if there is an existing function to take a string and convert it in either lowercase or uppercase.
If there is no such command/function, I guess I would have to do something like :
WholeString="";
for (i=0;i<stringa.length;i++)
{
Letter=stringa.substring(i,1);
if (Letter>"a" and Letter<"z")
{
Letter = something;
}
WholeString=concat(WholeString,Letter);
}
but am unshure of what the something would be; I thought of bitwise to go from [$41-$5f] to [$61-$7f] or vice versa, but can't find proper way.
[CS3] [AS 2.0] Converting Uppercase Input To Lowercase
background Ok round 2 after I got logged out for taking to long to write this. I am working on a chatbot I am having an issue with it where it cant take capital letters hence I want it to convert all capital letters to lowercase before searching the xml. I have attempted the use of the toLowerCase (); function to no avail though I am newish to actionscript as Im use to being artist, rather than programmer. Also if anyone can help me get it to reconise characters like é that would be much help.
Information
xml- questions.xml
input box instance - input_txt
output box instance - output_txt
triggered on enter
font - _sans
Any other information just ask
Code:
ChatBot();
function ChatBot(){
this.callbackHandler = this.Handler;
this.callbackHandlerLocation = this._parent;
Key.addListener(this);
this.init();
}
function setCallbackHandler(method, location){
this.callbackHandlerLocation = (location == undefined) ? this.callbackHandlerLocation: location;
this.callbackHandler = method;
}
function onKeyDown(){
if(Key.isDown(Key.ENTER)){
this.findAnswer(this.input_txt.text);
this.output_txt.scroll = this.output_txt.maxscroll;
this.input_txt.text = "";
Selection.setFocus(this.input_txt);
}
}
function say(the_str){
this.output_txt.text += the_str + newline;
}
function init(){
me = this;
this.my_xml = new XML();
this.my_xml.ignoreWhite = true;
this.my_xml.onLoad = function(success){
if(success){
var root_xml = this;
while(root_xml.nodeName == null){
root_xml = root_xml.firstChild;
}
//trace(root_xml);
me.dataObj = new Object();
me.createObject(me.dataObj, root_xml);
Selection.setFocus(this.input_txt);
}else{
this.output_txt = "error loading xml";
}
}
this.my_xml.load(this.the_file);
}
// convert the XML database to native flash object database
function createObject(theObj, the_xml){
for(var i in the_xml.childNodes){
if(the_xml.childNodes[i].nodeValue == null){
var obj = theObj[the_xml.childNodes[i].nodeName] = new Object();
this.createObject(obj, the_xml.childNodes[i]);
}else{
theObj["text"] = the_xml.childNodes[i].nodeValue;
}
}
}
// search the database based on text entered
function findAnswer(the_str){
the_str = this.shaveChars(the_str);
//start Failed
//var myString:String = the_str.text;
//the_str = this.toLowerCase(the_str);
//End
var my_array = the_str.split(" ");
var firstFound = null;
my_array.push("text");
var pos = this.dataObj;
for(var i = 0; i < my_array.length; i++){
if(pos[my_array[i]] != undefined){
pos = pos[my_array[i]];
if(firstFound == null){
firstFound = my_array[i];
}
}
}
if(pos.length != undefined){
var text_array = pos.split("|");
for(var i = 0; i < text_array.length; i++){
var n = text_array[i].lastIndexOf(":");
if(n >= 0){
var x_str = text_array[i].substr(n+1);
this.execCallback(x_str);
}else{
this.output_txt.text += text_array[i] + newline;
}
}
}else{
if(firstFound == null){
this.output_txt.text += "Sorry, I don't understand. Please ask questions only." + newline;
}else{
this.output_txt.text += "I don't know "+firstFound+" that is." + newline;
}
}
}
// removes unwanted characters
function shaveChars(the_str){
var chars_array = new Array(".", "?", ",", "!", "'");
for(var i in chars_array){
var str_array = the_str.split(chars_array[i]);
the_str = str_array.join("");
}
return the_str;
}
function execCallback(the_str){
trace("exec: "+the_str+" "+this.callbackHandler);
this.callbackHandlerLocation[this.callbackHandler](this, the_str);
}
thanks
Making The First Character Of A String Uppercase
Hi guys,
How can I make the first character in a String Uppercase?
For example that "hello world." will be converted to "Hello world."
I've searched the help files but i found that replace() together with toUpperCase() wouldn't quite work.
Thanks,
Tilpo.
Keyboard Listeners Only Taking Uppercase
I have ran into a problem.
I am making an application that has to register user keyboard input. Since it did not work to well, i cut down the listening part to only contain this:
________
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyhandler);
private function keyhandler (event:KeyboardEvent):void
{
trace(event.charCode);
}
________
What happens is that the program will only react to keyboard hits that are entered if i hold down the shift key. If i do not hold down shift it will only register hits on a few keys, w-d-u-x-å-ä-ö,<SPACE>, all numbers and everything on the numpad except enter. What am i doing wrong?
Limit Input Text To Uppercase Only?
I've got an input field that's using a pixel font that's pretty small. SOO...I'd like to limit the user's input to only uppercase letters. I tried to just embed the uppercase letters, but that doesn't seem to work - perhaps because I have the whole font on my system already? Even if that's the case, and it will work on most people's systems, how do I make sure that even if they type without the Shift Key or Caps Lock, that the letters are only uppercase? Is there a simple script for this somewhere?
Convert First Letter Of A String To Uppercase
Hi all,
When I use myString.toUpperCase(), the entire string becomes uppercase.
How do I extract the first letter and convert only it to uppercase? Do I have to split and then concate? If so, can someone give me an inkling of how to do it?
tks a lot for your help!
Limit Input Text To Uppercase Only?
I've got an input field that's using a pixel font that's pretty small. SOO...I'd like to limit the user's input to only uppercase letters. I tried to just embed the uppercase letters, but that doesn't seem to work - perhaps because I have the whole font on my system already? Even if that's the case, and it will work on most people's systems, how do I make sure that even if they type without the Shift Key or Caps Lock, that the letters are only uppercase? Is there a simple script for this somewhere?
Uppercase/lowercase Differentiation In Hardcoded Strings
Hey All,
i want to make this font for a project but it needs to be created in flash so that there is an outline separate from the font itself so that either one can be colored dynamically.
i also want to make the font dynamic to respond to user input AND for hardcoded stings.
i can do all the dynamics (color, typing and user input) but it's when i test this for example:
"HELLO WORLD" => this comes out as HELLO WORLD ... fine...
but
"Hello World" => comes out as HELLO WORLD.
i've tried 2 things:
used char codes and capitals only... but that looks crap... and i need it to have lowercase and punctuation.
also, i've tried the difficult way with 1 movie clip containing the font oulines and fills and a clip.gotoAndStop(letter); type.
but this presents the same problem because gotoAndPlay('_A'); is the same as gotoAndPlay('_a'); (the '_' is there so i can use numbers later). Obviously.. i'd like to know if there's a way to structure this so that i can have uppercase and lowercase in the same clip.
Any ideas? Thanks.
Special Characters, Input Field And UPPERCASE
Hi everyone!
I have an input_txt that is supposed to be all in uppercase. After embedding only uppercase letters and the special characters needed (Á, É...) I realized that users still would need to press shift+´+e to get É (in wich case you might aswell just ask the user to press caps lock instead ).
Now is there a way of making the input_txt show only uppercase on the fly, that works better with these chars? Like listening for ´+e and replace it with É or something...
Anyones previouses experiences are greatly appreciated.
Making Input Text All Lower Or Uppercase
I know it's a very simple problem, but I is confused -_-
my input box is called mySearch, and the code is and a button to click on to activate search. There is also an array called searchList
Code:
on (release) {
var mySeek = mySearch.text;
for( ii = 0; ii<searchList.length; ii++) {
if (mySeek = searchList[ii]) {
trace("Found it!");
}
}
}
I tried doing mySeek = mySeek.toLowerCase; after var mySeek = mySearch.text;
OOPS!! I looked at the help file again and realized I forgot the () after toLowerCase... that's why it kept erroring about a function... anyway, I how do I delete a thread such as this?
Input Text Field: Embed Uppercase Letters
Hi all,
I use input text fields with character options chosen to embed only uppercase letters. I have used this type of field many times before, but for some reason in my current project the uppercase outlines are not embedding for all letters. For example, when I type "who" in the field it looks like "Who" instead of "WHO" or when I type "hat" in the field it looks like "hAt" instead of "HAT".
I have tried copying fields from other movies that work correctly, recreating new fields, and changing the instance names. I don't use any type of special programming other than the settings in the properties panel and have never had this problem. Any suggestions regarding what could possibly be set differently to cause this?
Changing Text From Lowercase To Uppercase In Animated Button
hey guys,
I have a question. I am just learning flash, just finished my first book. So I am trying to recreate a site that I like for practice. There is a site - www.dillingerescapeplan.com - that has a nifty nav bar where the text animates from lowercase to uppercase. I have part of it done.
I have mine animating from lower to upper. The way i did it was: a button, that had a movieclip of that text animation on the over state. What i can't figure out is how he got it to animate even when the mouse moves off the button, mine just reset's....
check out that site and you'll see what i mean..
if nayone has any ideas or know's how to do that let me know please.
thanks
Selected "UpperCase"
Hello,
We all know how to turn a word or sentence to Upper/Lower Case.
like this :
var str:String = "Dr. Bob Roberts, #9."
trace(str.toLowerCase()); // dr. bob roberts, #9.
trace(str.toUpperCase()); // DR. BOB ROBERTS, #9.
After these methods are executed, the source string remains
But How to proceed i f I want this :
Dr. Bob Roberts instead of all UpperCase ?
Thanks,
|