First letter of the string to the capital

Hello.  Try to get the first letter of a string to the capital and the rest of the chain must be lowercase.  I think I'm on the right track with the first letter, but don't know how to do any other have to be lowercase.

Here is a little info that I might need to change things.
I load in a flashvar drive by

var flashVar3  = root.loaderInfo.parameters.myVar2;

I don't know not what type of data, it would be, not course what flashvars comes as.  I then

var oldStr:String = flashVar3;
var newStr:String = oldStr.charAt(0).toUpperCase() + oldStr.substr(1);
tf3.text=" "+ newStr;

I don't know if the first line is a problem, because I do not know if the flashvars comes in form of string.  But what I usually would work on the first letter. Not sure how I can force the rest of the chain to be tiny well.


Currently, I get the error

TypeError: Error #1010: a term is undefined and has no properties.

But I don't know if it's because my flashvars variable is set when running.  Counsel on getting that all this work would be great.

see you soon

And while you're trying to understand and get version of Andrei work, here the solution I was referring to which is based on the methods/array of strings and builds on what you already work with some of the ignored words... I won't claim about two approaches is best/better, just different approaches...

var str:String = ' this IS a string to capitalize. "

var ignoreArray = ['the', 'is', ' one ',' one ',' at '];

var strArray = str.toLowerCase ().split("");

for (var i: int = 0; i
If (ignoreArray.IndexOf (strArray [i]) ==-1) {}
strArray [i] = strArray [i] .charAt (0) .toUpperCase () + strArray [i] .substr (1);
}
}

var newStr:String = strArray.join("");
trace (newStr);

Tags: Adobe Animate

Similar Questions

  • On Windows 7, how to implementing automatic uppercase the first letter of the first book and the first letter after each period?

    I'm using Windows 7, how do I configure my system automatically capitalized the first letter of the first word and the first letter after each period?

    Thank you

    Lisa.

    Hello Lisa,.

    It's more to do with the word processor on Windows. You don't say what word processing software you use. If you use WordPad which comes free with Windows, it is impossible to do what you want to do. However, if you are using Microsoft Office Word (that you can buy) then the CAP is set by default.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • How to select files in a directory by typing the first letter of the name as in 95 - > XP

    How to select files in a directry by typing the first letter of the name as in XP

    Something has changed on my copy of Vista 64 bit Home Premium edition, and now when I try to type the first letter of a name of file to access it, rather Vista puts in the search box in the upper right corner of the window.

    It's counterproductive and annoying _ out of me. I want to jump for filenames beginning with that letter, not clear the screen and show the stuff that is not in the current directory. Especially since I regularly work with earlier versions of windows.

    How should I do so that I can type in the names of files in Explorer and jump to files beginning with this letter as in all previous versions of Windows since at least win95?

    Go to start / Control Panel / folder Options / view and scroll down where it presents two options when entering in the list view.  Check the box to select the item type in the view.  This is part of what you want.

    If you type a letter, it will go to the files/folders starting with this letter (and not the search box); However, I just tried it myself and it seems to work only for the first letter.  If you type in a second letter, he will then the files/folders starting with THIS letter instead of files that begin with the first letter typed and then refining to files beginning with the two first letters typed and so on.  I can't make it work any better than this - unless I type really fast (and it seems to work as it should most of the time).  And I want really fast.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • When you create a new email a first letter of the contact request full email address on frequent contacts.

    original title: contact prompting

    When you create a new email a first letter of the contact request full email address on frequent contacts. How to extend the time, what he remembers of those contacts?

    WinMail remembers only 29 addresses used through the registry. These links will give you a few options.

    How to delete registration completion email in Windows Mail
    http://www.Winhelponline.com/articles/245/1/how-to-clear-the-email-auto-complete-entries-in-Windows-mail.html

    How to remove an address from the list of AutoComplete in Windows Mail
    http://email.about.com/od/windowsmailtips/Qt/et_del_autocomp.htm

  • Lowercase first letter in the name of the column in the non-interactive report... Once again

    A few days ago a posted a question on how to make the column name in a non-interactive report
    out like the lowercase. (original post: lowercase first letter on behalf of the non-interactive report column )
    I use Theme13, which is probably the only theme that forces the first letter
    a column in a report uppercase name.




    In any case, I received several responses, including the response that I applied on my page.
    Then I went back to make the column sortable and which denies the alternative CSS and
    the first letter of the name of the column is back in uppercase... arrrggghhh!

    Are there any other suggestions on how to force lowercase with Theme 13 and a sortable column?

    Thank you
    Donna

    Hello

    Do you have it wrapped in the style tag?

    
    

    BR, Jari

  • Double capitalizing the first letter of the community don't

    Eevery time I post in these forums of the community on my Pro 9.7 "iPad in Safari, it capitalizes and duplicates the first letter. I keep coming back and fixing it in my usual posts, but I left it on this post if you could see what I mean. No other page in Safari does that. The community of Apple Support alone. I tried all the standard fixes (restart, shut down Safari, etc.), but it looks like he may have to do with the site itself. I noticed other people with this same event messages, it's not just me. Thoughts?

    Interesting. I've alerted the hosts to your message.

  • Lowercase first letter in the name of the column in the non-interactive report

    I have a report of this query:
    SELECT DISTINCT
    v.isotope, v.location,
    v.activity_in_ucuries as 'uCi '.
    V INVENTORY
    where v.location = 'IN PROCESS'
    and v.activity_in_ucuries > 0

    Note "as"uCi"" - when the report is displayed the tiny u is displayed like a capital U
    Column attributes, I put the header of column as lowercase. In the report attributes I titled as custom defined Type
    and the title of column displayed in lowercase. I also tried to use the a field type of column names. With all these changes the
    report always comes out with a capital u.

    Is there a way to protect the automatic set of the first capital letter and also to force the first letter lowercase?

    Thank you
    Donna

    As fac586 mentioned previously, you will need to override the style for the header of the table. Do you it by putting it in the page header:


    < style >
    Th.t13ReportHeader
    {
    text-transform: none;
    }
    < / style >

  • Safari truncates the first letter of the email address.

    Something new in Safari. When I type my e-mail address in a field he deletes the first letter of my e-mail address and I have to manually replace. Is this a problem with AutoCorrect? In the contact e-mail address has not changed.

    The spell checker can be falsely correct the entry. Please select the incorrect entry and click or control. In the context menu, select

    Spelling and grammar ▹ display spelling and grammar

    A small window will open. In the top text box, enter the correct text, then click on change and close the window.

  • On in the next email, only the first letter of the sender is displayed?

    I actually have to open the email to see who is the sender. This just started this morning. Anyone know what I do to display the name of the sender? It comes to Windows Live mail.

    Windows Live Mail is supported in this forum
    http://answers.Microsoft.com/en-us/windowslive/Forum/LIVEmail?tab=all

  • How can I make my text even the first letter to the last letter after I twisted it? My "S" is higher than my "D".

    Screenshot (21).png

    It's always a direct envelope? You can adjust the envelope using the gradient mesh tool.

  • Why no iphone 6 and iPad (mini and Air2) capital at the beginning of the first word in the search bar of Safari

    Why no iPhone 6 and iPad (Mini and Air 2) not capitalize first letter of the first word in Safari on the search bar?

    Web addresses contain no capital letters, nor do email. If looking at you any new credit card and it says to activate this card go to www.CardnameService.com/Activate, their meaning is www.cardnameservice.com/activate. It's the same thing.

    The above examples are that of the examples.

  • Is it possible to restore the previous features of the search box (press F4, first letter, go)? It is so much faster.

    The way the search box has been changed in the new version really slows change search engines. Is there any setting in order to restore the old feature? Be able to press F4 and then press the first letter of the engine that you want done things seriously fast. It was one of the main reasons I stuck with firefox. The same functionality can still be maintained with the new design. Even if I memorized the number of tabs between the search engines in the new system, it would be even heavier.

    Hello, I have suffered from a similar problem with the new search bar type. I found that you can go in about: config, then find the Boolean browser.search.showOneOffButtons and which switches. This should restore the old function. (You may have to restart your browser)

    Note that, as always, change your Subject: config at your own risk.

    credit: askvg.com

  • Get rid of the rule of the first letter in paragraph targeted

    Hello

    I have the following rule, which defines the color of the first letter of each of my paragraphs:

    p:first - letter {}

    make-weight: bold;

    Color: #F00;

    do-size: 36px;

    }

    I want one of my paragraphs to not have this style applied to it, so I assigned a class (< class p 'caveat' = >, the following:)

    #mainContent caveat {}

    background-color: #09F;

    color: #FFF;

    text-align: center;

    font size: large;

    make-weight: bold;

    }

    Unfortunately, she styles everthing in the rule except the rule of the first letter. This paragraph still seems to be to inherit this rule.

    How can I get rid of the rule of the first letter of the paragraph?

    Thank you

    Add

    {p.caveat:first - letter #mainContent

    color: #FFF;

    font size: large;

    }

    GRAMPS

  • Grouping alphabetically by the first letter

    I want to create a query that will consolidate the results based on the first letter of the text record. First, they would be grouped by category, then by letter of the alphabet and then be alphabetized. I would also like to use this query to try to fill a CFTREE.

    For example, I would use books.

    The query sorts by: Book category, the first letter of the title of book, and finally the title of the book.

    The results would be grouped by: Book category, then the first letter of the title book.

    Don't worry about the order of. Simply order by category then the title of the book. Select the first letter and use it for grouping in your cfoutput.

  • Acrobat form - how to take advantage of the first letters of the words of field.

    I produced my first Acrobat form and am setting the validation rules on certain fields.  I want to ensure all names and addresses are saved with the first letter of each word being a capital as well as the letters are lower case.   While I found and read a few reviews, I have no script experience and positions assume a reasonable understanding of scripting, debugging, etc.

    Could someone please explain how I can achieve this.

    Thank you

    You must understand how the data will be entered and what you want to accomplish. If you want to have a function as title case, then you will need to adjust objects or other words that would not be capitalized. Users will use another character other than a space to separate words?

    Since it is an action of formatting, I would put the script as the custom format or a validation script, so that this code is not rerun each time a field used in a calculation is updated.

    Assuming that only a space character will separate the words, you can use the method '. split() ' to an array of words in the text entered in a field. You can then browse the array of words and affecting the first uppercase character and the rest of the word in lowercase, using the 'substr()' method or other methods of the property of type string.

    The simplest version of this could be:

    aInput var = event.value.split(""); make a table divided in space
    var sCharacter = ";
    Sword of var = ";

    for each element of the word table, uppercase the first letter
    for (i = 0; i
    aInput [i] = aInput [i] .substr (0, 1) .toUpperCase () + aInput [i] .substr (1). toLowerCase();
    } / / end of loop for the input string
    rebuild the input string with words changed with spaces
    Event.Value = aInput.join(' ');

    But since you will repeat this code in several areas, I would create document-level functions, so the code is in one place and be interpreted pre and run faster:

    function UpperCase (sString) {}
    Return sString.toUpperCase ();
    }

    function LowerCase (sString) {}
    Return sString.toLowerCase ();
    }

    function FirstUpperCase (sInput) {}

    aInput var = sInput.split(""); make a table divided in space
    var sCharacter = ";
    Sword of var = ";

    for each element of the word table, uppercase the first letter
    for (i = 0; i
    aInput [i] = uppercase (aInput [i] .substr (0, 1)) + LowerCase (aInput [i] .substr (1));
    } / / end of loop for the input string
    rebuild the input string with words changed with spaces
    Return aInput.join(' ');
    }

    You can then use the following code in each domain where you want to force the first character uppercase:

    Event.Value = FirstUpperCaseinputinputletter for (event.value);

    Another solution would be to use the following code in the format or validate the script:

    Event.Value = event.value.toLowerCase () replace (/ \b\w/g, function (match) {return match.toUpperCase () ;});})

    This script uses the RegEx object and its method of ". replace() ' using a self funciton set with the corresponding string.

Maybe you are looking for