A-C > Boolean (function)

 

Boolean (function)

Availability

Flash Player 5.

Usage

Boolean(expression)

Parameters

expression An expression to convert to a Boolean value.

Returns

Nothing.

Description

Function; converts the parameter expression to a Boolean value and returns a value as follows:

If expression is a Boolean value, the return value is expression.

If expression is a number, the return value is true if the number is not zero, otherwise the return value is false.

If expression is a string, the toNumber method is called and the return value is true if the number is not zero, otherwise the return value is false.

If expression is undefined, the return value is false.

If expression is a movie clip or an object, the return value is true.