Name
Boolean.valueOf( ) Method — the primitive value of the Boolean object
Availability
Flash 5
Synopsis
booleanObject.valueOf( )
Returns
The Boolean value 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 stored internally thereafter.
Description
The valueOf( )
method returns the primitive
Boolean datum associated with a Boolean object. Although the internal
value of a Boolean object is inaccessible, we can use
valueOf( )
to convert it to its primitive
equivalent.
Example
x = new Boolean(0); trace(x.valueOf( )); // Displays: false
See Also
Object.valueOf( )
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.