03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - 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.

Returns<br />

String - A string.<br />

Example<br />

In the following example, you use <strong>ActionScript</strong> to convert specified expressions to a string:<br />

var string1:String = String("3");<br />

var string2:String = String("9");<br />

trace(string1+string2); // 39<br />

Because both parameters are strings, the values are concatenated rather than added.<br />

See also<br />

toString (Number.toString method), toString (Object.toString method), String,<br />

" string delimiter operator<br />

substring function<br />

substring(string:String, index:Number, count:Number) : String<br />

Deprecated since Flash Player 5. This function was deprecated in favor of String.substr().<br />

Extracts part of a string. This function is one-based, whereas the String object methods are<br />

zero-based.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 4<br />

Parameters<br />

string:String - The string from which to extract the new string.<br />

index:Number - The number of the first character to extract.<br />

count:Number - The number of characters to include in the extracted string, not including<br />

the index character.<br />

Returns<br />

String - The extracted substring.<br />

See also<br />

substr (String.substr method)<br />

110 <strong>ActionScript</strong> language elements

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

Saved successfully!

Ooh no, something went wrong!