Operators
161
Example
In the following example, the variable
happy
is set to
false
. The
if
condition evaluates the
condition
!happy
, and if the condition is
true
, the trace() statement sends a string to the
Output panel.
var happy:Boolean = false;
if (!happy) {
trace("don't worry, be happy"); //traces don't worry, be happy
}
The statement traces because
!false
equals
true
.
See also
!= inequality operator
,
!== strict inequality operator
,
&& logical AND
operator
,
|| logical OR operator
,
== equality operator
,
=== strict equality
operator
not logical NOT operator
not
expression
Deprecated
since Flash Player 5. This operator was deprecated in favor of the
! (logical
NOT)
operator.
Performs a logical NOT (!) operation in Flash Player 4.
Availability:
ActionScript 1.0; Flash Lite 1.0
Operands
expression :
Object
- A variable or other expression that converts to a Boolean value.
Returns
Boolean
- The result of the logical operation.
See also
! logical NOT operator
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...