MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 229

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

Advertisement

Example
The following example uses ++ as a post-increment operator to make a
i = 0;
while(i++ < 5){
trace("this is execution " + i);
}
This example uses ++ as a pre-increment operator.
var a = [];
var i = 0;
while (i < 10) {
a.push(++i);
}
trace(a.join());
This script displays the following result in the Output panel:
1,2,3,4,5,6,7,8,9,10
The following example uses ++ as a post-increment operator.
var a = [];
var i = 0;
while (i < 10) {
a.push(i++);
}
trace(a.join());
This script displays the following result in the Output panel:
0,1,2,3,4,5,6,7,8,9
! (logical NOT)
Availability
Flash Player 4.
Usage
!expression
Parameters
None.
Returns
A Boolean value.
Description
Operator (logical); inverts the Boolean value of a variable or expression. If
variable with the absolute or converted value
expression
x && y
The following expressions illustrate the result of using the ! operator:
returns
!true
false
returns
!false
true
evaluates to
, the expression
false
, the value of
true
!expression
evaluates to
!(x && y)
loop run five times.
while
is a
expression
is
. If the
false
.
true
! (logical NOT)
229

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?

Subscribe to Our Youtube Channel

Table of Contents