Booleans

Booleans

A Boolean object is a data type that can have one of two values, either true or false, used for logical operations.

To create a Boolean object, you can use the constructor or the global function, or assign a literal value. It doesn't matter which technique you use; in ActionScript 3.0, all three techniques are equivalent. (This is different from JavaScript, where a Boolean object is distinct from the Boolean primitive type.)

The following lines of code are then equivalent:
var flag:Boolean = true;
var flag:Boolean = new Boolean(true);
var flag:Boolean = Boolean(true);