Boolean Function - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Usage 3: The following example creates an array with three defined elements:
var myArray:Array = Array("firstElement", "secondElement", "thirdElement");
trace (myArray); // traces firstElement,secondElement,thirdElement
Unlike the Array class constructor, the Array() function does not use the
keyword new .
See also
Array

Boolean function

Boolean(expression:Object) : Boolean
Converts the parameter
following list:
If
is a Boolean value, the return value is
expression
If
is a number, the return value is
expression
the return value is
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
if the number is not zero,
true
In files published for Flash Player 7 or later, the result is
greater than zero; the value is
If
is a string, the result is
expression
value is
for an empty string.
false
If
is
expression
If
is a movie clip or an object, the return value is
expression
Unlike the Boolean class constructor, the Boolean() function does not use the keyword new .
Moreover, the Boolean class constructor initializes a Boolean object to false if no parameter is
specified, while the Boolean() function returns undefined if no parameter is specified.
Availability: ActionScript 1.0; Flash Lite 2.0 - Behavior changed in Flash Player 7.
Parameters
expression:Object
Returns
- A Boolean value.
Boolean
to a Boolean value and returns a value as described in the
expression
.
false
for an empty string.
false
true
or
(not a number), the return value is
undefined
NaN
- An expression to convert to a Boolean value.
expression
if the number is not zero; otherwise
true
otherwise.
false
true
if the string has a length greater than zero; the
.
if the string has a length
.
false
.
true
Global Functions
39

Advertisement

Table of Contents
loading

Table of Contents