1130
ActionScript classes
concat (String.concat method)
public concat(value:Object) : String
Combines the value of the String object with the parameters and returns the newly formed
string; the original value,
my_str
, is unchanged.
Availability:
ActionScript 1.0; Flash Player 5
Parameters
value
:Object
- value1[,...valueN] Zero or more values to be concatenated.
Returns
String
- A string.
Example
The following example creates two strings and combines them using
String.concat()
:
var stringA:String = "Hello";
var stringB:String = "World";
var combinedAB:String = stringA.concat(" ", stringB);
trace(combinedAB); // output: Hello World
fromCharCode (String.fromCharCode method)
public static fromCharCode() : String
Returns a string comprising the characters represented by the Unicode values in the
parameters.
Availability:
ActionScript 1.0; Flash Player 5
Returns
String
- A string value of the specified Unicode character codes.
Example
The following example uses
fromCharCode()
to insert an
@
character in the e-mail address:
var address_str:String = "dog"+String.fromCharCode(64)+"house.net";
trace(address_str); // output: [email protected]
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...