String.fromCharCode( ) Class Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
String.fromCharCode( ) Class Method Flash 5

generate a string from one or more code points
String.fromCharCode(code_point1, code_point2,...code_pointn)

Arguments

code_ point1,...code_ pointn

A series of one or more integers corresponding to Unicode character code points.

Returns

A string formed by concatenating the characters represented by the specified code points.

Description

The fromCharCode( ) class method produces a character or series of characters from character code points, as described in Chapter 4. For code points below 128, it effectively builds a string from a series of ASCII codes.

Example

// Makes a copyright symbol, followed by the year (2003) copyNotice = String.fromCharCode(169) + " 2003";

See Also

String.charCodeAt( ); "The fromCharCode( ) function," in Chapter 4; Appendix B



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net