MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 291

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

Boolean.valueOf()
Availability
Flash Player 5.
Usage
myBoolean.valueOf()
Parameters
None.
Returns
A Boolean value.
Description
Method; returns
it is false.
Example
var x:Boolean = new Boolean();
trace(x.valueOf());
x = (6==3+3);
trace(x.valueOf());
Boolean()
Availability
Flash Player 5; behavior changed in Flash Player 7.
Usage
Boolean(expression)
Parameters
An expression to convert to a Boolean value.
expression
Returns
A Boolean value or the value
Description
Function; converts the parameter
If
is a Boolean value, the return value is
expression
If
is a number, the return value is
expression
return value is
false
If
is a string, the return value is as follows:
expression
In files published for Flash Player 6 or earlier, the string is first converted to a number; the
value is
true
In files published for Flash Player 7 or later, the result is
than zero; the value is
if the primitive value type of the specified Boolean object is true,
true
// false
// true
expression
expression
.
if the number is nonzero,
for an empty string.
false
, as described below.
to a Boolean value and returns a value as follows:
expression
if the number is not zero, otherwise the
true
otherwise.
false
true
.
if the string has a length greater
Boolean()
if
false
291

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Table of Contents