Our String functions include routines for conversion of strings to all upper case, all lower case or title caps (where the first letter of each word is a capital and the rest are lower case). The Space removal functions allow for trimming spaces on the left or right or both, as well as deleting doubled spaces or even removing all of spaces from a string.We have two movie clips (MCs) Case and Spaces. Copy the needed MC to the main timeline of your FLA. Make sure the Movie Clip is available when you are to Call it. Normally it is best to put the Plug and Play movie clip in a layer of its own, so it can be available from any place on the timeline. If you don't need all the functions in an MC, you can delete unneeded functions, note the String Case functions need one or both of the Single Character Case functions.
String Case Functions: AllLower - Frame 3 of Case MC (Needs Lower) AllCaps - Frame 4 of Case MC (Needs Upper) TitleCaps - Frame 5 of Case MC (Needs Lower & Upper) Single Character Case Functions: Upper - Frame 8 of Case MC Lower - Frame 9 of Case MC String Space Removal Functions: TrimLeft - Frame 4 of Spaces MC TrimRight - Frame 5 of Spaces MC TrimEnds - Frame 6 of Spaces MC RemoveAll - Frame 7 of Spaces MC RemoveDoubled - Frame 8 of Spaces MC
Using the Routines
For all the functions (except Single Character) if your variable is already named String then all you have to do is Call the appropriate function below:Call ("/String:AllLower") Call ("/String:AllCaps") Call ("/String:TitleCaps") Call ("/Spaces:TrimLeft") Call ("/Spaces:TrimRight") Call ("/Spaces:TrimEnds") Call ("/Spaces:RemoveAll") Call ("/Spaces:RemoveDoubled")However, if your variable is not named String then you will need to set your variable to equal String before the Call and then set String to equal your variable after the Call.Set Variable: "String" = YourVarName Call ("/String:AllCaps") Set Variable: "YourVarName" = StringSingle Character Routines
For The Single Character functions you will need to set your variable to equal /String:Char before the Call and then set /String:Char to equal your variable after the Call. Substitute your variable name for 'YourVarName' and select the appropriate Call.Set Variable: "/String:Char" = YourVarName Call ("/String:Upper") Set Variable: "YourVarName" = /String:Char or Set Variable: "/String:Char" = YourVarName Call ("/String:Lower") Set Variable: "YourVarName" = /String:Char