03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This method is similar to String.charAt() except that the returned value is a 16-bit integer<br />

character code, not a character.<br />

Parameters<br />

index:Number - An integer that specifies the position of a character in the string. The first<br />

character is indicated by 0, <strong>and</strong> the last character is indicated by my_str.length - 1.<br />

Returns<br />

Number - An integer that represents the character specified by index.<br />

Example<br />

In the following example, this method is called on the first letter of the string "Chris":<br />

var my_str:String = "Chris";<br />

var firstChar_num:Number = my_str.charCodeAt(0);<br />

trace(firstChar_num); // output: 67<br />

See also<br />

charAt (String.charAt method)<br />

concat (String.concat method)<br />

public concat(value:Object) : String<br />

Combines the value of the String object with the parameters <strong>and</strong> returns the newly formed<br />

string; the original value, my_str, is unchanged.<br />

Parameters<br />

value:Object - value1[,...valueN] Zero or more values to be concatenated.<br />

Returns<br />

String - A string.<br />

Example<br />

The following example creates two strings <strong>and</strong> combines them using String.concat():<br />

var stringA:String = "Hello";<br />

var stringB:String = "World";<br />

var combinedAB:String = stringA.concat(" ", stringB);<br />

trace(combinedAB); // output: Hello World<br />

String 595

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!