Flash CS3 Documentation |
|||
| Flash Lite 2.x ActionScript Language Reference > ActionScript classes > Boolean > toString (Boolean.toString method) | |||
public toString() : String
Returns the string representation ("true" or "false") of the Boolean object.
String - A string; "true" or "false".
This example creates a variable of type Boolean and uses toString() to convert the value to a string for use in the trace statement:
var myBool:Boolean = true;
trace("The value of the Boolean myBool is: " + myBool.toString());
myBool = false;
trace("The value of the Boolean myBool is: " + myBool.toString());
Flash CS3