
Boolean.valueOf() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
456
|
ActionScript Language Reference
Returns
The string “true” if the primitive value of booleanObject is true; “false” if the primitive
value of
booleanObject is false. The value of the Boolean object is specified when the
object is constructed, and it is stored internally thereafter. Although the internal value of a
Boolean object is obtainable via valueOf(), we can use toString() to convert it to its string
equivalent.
Description
The toString() method retrieves the primitive value of a Boolean object, converts that value
to a string, and returns the resulting string.
Example
x = new Boolean(true);
trace(x.toString()); // Displays: "true"
See Also
Object.toString()
Boolean.valueOf() Method
the primitive value of the Boolean object
Flash 5
booleanObject.valueOf()
Returns
The Boolean value true if the primitive value of booleanObject is true; false if the primi-
tive value of
booleanObject is false. The value of the Boolean object is specified when the
object is constructed, and it is stored internally thereafter.
Description
The valueOf() method returns the primitive Boolean datum associated with a Boolean
object. The valueOf() method returns the
value argument with which the constructor was
called, converted to its primitive Boolean equivalent.
Example
x = new Boolean(0); ...