Groups | Blog | Home
all groups > flash actionscript > february 2005 >

flash actionscript : Variable to uppercase


Byron Canfield
2/25/2005 11:34:56 AM
I don't think that will accomplish what you think it will accomplish. If you
are using Flash MX (not 2004), the case of the variable name is irrelevant,
so such conversion would be pointless. If you are using Flash MX 2004, case
IS relevant and performing such an operation would NOT convert the variable
name, it would create a NEW one with the new case, distinct and separate
from the old one.

--
"There are 10 kinds of people in the world:
those who understand binary numbers and those who don't."
-----------------------------
Byron "Barn" Canfield
Flash example files: http://www.canfieldstudios.com
[quoted text, click to view]

Byron Canfield
2/25/2005 12:35:12 PM
That's different. That's changing the VALUE stored IN the variable, not the
variable name.

And that would be simply:

myVar = myVar.toUpperCase();

--
"There are 10 kinds of people in the world:
those who understand binary numbers and those who don't."
-----------------------------
Byron "Barn" Canfield
Flash example files: http://www.canfieldstudios.com

Jimmy Vegas
2/25/2005 7:12:21 PM
Hi All,
I know I could probably figure this out with trial and error, but kinda in a
rush.

I need to convert a variable to all uppercase. I think I do this by converting
to a string then back to a variable. Using Flash MX.
Appreciate any code clips.

Thanks in advance.

Jimmy V
Jimmy Vegas
2/25/2005 7:47:21 PM
I don't know if explained myself well enough. I just need to convert a variable
that is created from a user input to all uppercase. So if a user types in "My
Name" the variable is converted to "MY NAME".

I thought this had to be done using the string.toUpperCase function
AddThis Social Bookmark Button