630
ActionScript classes
See also
charAt (String.charAt method)
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 Lite 2.0
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 Lite 2.0
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 Lite 2
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...