Flash CS3 Documentation |
|||
| Flash Lite 2.x ActionScript Language Reference > ActionScript classes > String > valueOf (String.valueOf method) | |||
public valueOf() : String
Returns the string.
String - The value of the string.
The following example creates a new instance of the String object and then shows that the valueOf method returns a reference to the primitive value, rather than an instance of the object.
var str:String = new String("Hello World");
var value:String = str.valueOf();
trace(str instanceof String); // true
trace(value instanceof String); // false
trace(str === value); // false
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00005465.html