True - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

true

Availability
Flash Player 5.
Usage
true
Description
Constant; a unique Boolean value that represents the opposite of
typing converts
true
.
"true"
Example
The following example shows the use of
var shouldExecute:Boolean;
/* ...
code that sets shouldExecute to either true or false goes here
shouldExecute is set to true for this example
*/
shouldExecute = true;
if (shouldExecute == true) {
trace("your statements here");
}
/*
true is also implied, so the if statement could also be written:
if (shouldExecute) {
trace("your statements here");
}
*/
The following example shows how automatic data typing converts
var myNum:Number;
myNum = 1 + true;
trace(myNum); // output: 2
See also
,
false
Boolean class
ActionScript Language Reference
to a number, it becomes 1; when it converts
true
false
true
in an
statement:
if
true
CHAPTER 2
. When automatic data
to a string, it becomes
to the number 1:
true
983

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents