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.

Methods inherited from class Object<br />

addProperty (Object.addProperty method), hasOwnProperty<br />

(Object.hasOwnProperty method), isPropertyEnumerable<br />

(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf<br />

method), registerClass (Object.registerClass method), toString<br />

(Object.toString method), unwatch (Object.unwatch method), valueOf<br />

(Object.valueOf method), watch (Object.watch method)<br />

charAt (String.charAt method)<br />

public charAt(index:Number) : String<br />

Returns the character in the position specified by the parameter index. If index is not a<br />

number from 0 to string.length - 1, an empty string is returned.<br />

This method is similar to String.charCodeAt() except that the returned value is a character,<br />

not a 16-bit integer character code.<br />

Parameters<br />

index:Number - An integer specifying 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 />

String - The character at the specified index. Or an empty String if the specified index is<br />

outside the range of this String's indeces.<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_str:String = my_str.charAt(0);<br />

trace(firstChar_str); // output: C<br />

See also<br />

charCodeAt (String.charCodeAt method)<br />

charCodeAt (String.charCodeAt method)<br />

public charCodeAt(index:Number) : Number<br />

Returns a 16-bit integer from 0 to 65535 that represents the character specified by index. If<br />

index is not a number from 0 to string.length - 1, NaN is returned.<br />

594 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!