Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript language elements > Global Functions > String function | |||
String(expression:Object) : String
Returns a string representation of the specified parameter, as described in the following list:
Object.toString() if no such property exists."true" or "false".If expression is undefined, the return values are as follows:
undefined.Note: Slash notation is not supported by ActionScript 2.0.
Availability: ActionScript 1.0; Flash Player 4 - Behavior changed in Flash Player 7.
expression:Object - An expression to convert to a string.
String - A string.
In the following example, you use ActionScript to convert specified expressions to a string:
var string1:String = String("3");
var string2:String = String("9");
trace(string1+string2); // output: 39
Because both parameters are strings, the values are concatenated rather than added.
toString (Number.toString method), toString (Object.toString method), String, " string delimiter operator
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001773.html