EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Concat (String.concat Method); Fromcharcode (String.fromcharcode Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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: dog@house.net

Table of Contents

Related product manuals